# Authenticating agents that share a process

> An agent can lose its memory while its mailbox survives. Remembering the credential restores access, until a shared name gives two workers the same key.

Written August 2026, revised October 2026. Agenxy — https://agenxy.org/writing/agent-identity/

---
Register an agent, give it a mailbox and send it a question. The board can
accept all three steps while the question waits days for an agent that
cannot act. An accepted request and a reachable worker can look identical
until someone checks what happened next.

Dibs coordinates AI agents on one person's machines. Agents declare work
and send mail; the person pays when identity fails. Two threads log each
other out, a fork loses its correspondence, or a question waits without
becoming overdue. Running about forty agents exposed the same mistake in
several forms: treating something near the agent as the agent itself.

## The kernel can name the harness

An operating system authenticates users and processes. An agent inside a
shared harness has no corresponding kernel principal. Three agents can
occupy one address space, user id and process id. The kernel can identify
which harness sent a request and nothing finer.

Separate processes, accounts or virtual machines can supply boundaries
worth authenticating. Inside a shared process, identity is a claim made by
the harness and the agent. The practical question is what to attach the
claim to, including after the agent forgets.

Dibs initially used a nonce: a random string presented at registration,
stored as a raw map key and encrypted in the ledger, never displayed on the
board. The nonce is neither hashed nor compared in constant time. A process
able to exploit that shares the user's access to the ledger and its key.
The boundary is the user, not the agent.

Nothing initially kept the nonce outside the agent's context. Lose the
context, register again, and the board supplied a second seat. The first
seat kept the mail.

## Remembering the credential is not enough

The Dibs bridge, a small process the harness spawns to reach the board,
started remembering nonces in an owner-only file outside the project tree.
It supplied the remembered value when an agent registered without one.
That recovered seats after context loss. The cache used the project
directory and role name to decide which seat to recover.

Two threads choosing the same name in one project received one credential.
Every registration rotated the seat's token, silently logging the other
thread out. The ledger records two registrations about three seconds apart,
from different process and thread ids. Neither supplied a nonce; the cache
gave both the same one. Another collision crossed harnesses: a ChatGPT
thread and a Claude Code session sharing a name received one credential,
after which calls were refused with `E_BAD_TOKEN`.

The fix keys the cache to the Codex thread id or Claude Code session id,
falling back to the bridge's process id and start time. Unknown evidence
supplies no automatic credential. Two threads may share a name without
sharing a seat. A useful label is no longer the key to someone else's mail.

## A session claim still needs checking

Claude Code's session sidecar names the session id and listening socket.
For a bridge to deliver mail into its own session, its actual parent's
sidecar must name the socket it inherited. Without that check, inherited
environment variables could direct mail into another session.

The sidecar is writable by anything running as the user. It distinguishes
sessions, without authenticating them against a hostile process of that
user. The session id passed in the harness environment can name an
ancestor's session. Only mail delivery checks the sidecar; the credential
cache uses a reported session identity.

Every agent reaches the board with the same local secret. Dibs's security
notes state the boundary: "agents sharing the local secret are inside the
trust boundary". Attaching a credential to a session prevents the observed
name collisions. It does not create isolation the harness lacks.

## Acceptance can leave a worker unreachable

Dibs wakes an idle ChatGPT agent through the app's channel and records the
app's acceptance. One question was first delivered to its agent 46 hours
58 minutes after acceptance; another waited about three days. According to
the agent, an app restart left its approval layer refusing Dibs calls until
the thread reloaded its tools. Every notice was accepted. None let the
agent act.

The question's response window begins at the recipient's first awareness,
so nothing became overdue. Acceptance also kept Dibs from counting the seat
as unreachable. Both records were consistent with a worker who could do
nothing. The queued fix treats an accepted wake without a subsequent call
as unreachable. Evidence of reach must come from the agent acting through
an authenticated call with its own credential.

## Merging mail must not grant access

A fork or lost credential can leave two seats for one worker. A coordinator
can merge the records. If that also moves credentials, an attacker can
create a seat with a chosen credential, merge it into another agent and
open that agent's mailbox.

A coordinator merge therefore moves mail, claims and spaces while retiring
the source credential. Using it returns `E_SEAT_MERGED`, identifying the
surviving seat. That seat's credential keeps working. Only the person or an
administrator can carry a credential across, with the consequence stated
in the preview.

A real merge moved four messages, retired the fork's credential and refused
a repeat. Moving the correspondence did not make its former key a new key
to the recipient.

## The person needs a claim they can check

Dibs holds each agent's declaration of work. Consequential requests reach
the person with an Approve button, so they can compare the declaration with
the proposed action. A macOS banner reports `shown: unconfirmed`; acceptance
by the notification system does not establish that anyone saw it. The
request remains open until the person answers.

Bind credentials to sessions, and establish reach through action. Keep the
person's decision attached to a declaration they can read. These rules
address the failures observed without pretending a shared process supplies
separate identities.

Harnesses should expose a per-session identity that local services can
verify. Until then, the reported session id is the best available anchor
for the cache. The claim is more useful when its limits can be checked.

## Sources

These are observations from building and running Dibs, rather than a claim
that the kernel authenticates agents inside one process. The initial nonce
scheme was described in August 2026; the failures and changes here were
recorded in October. Dates below use UTC.

The remembered-credential file is under `~/.dibs`. Claude Code's sidecar is
`~/.claude/sessions/<pid>.json`. The session-cache correction is Dibs #454;
the parent/socket delivery check is #445; coordinator merge handling is #453.

The cross-harness collision occurred on 15 October; the two registrations
about three seconds apart were on 18 October. The delayed question was
accepted on 17 October; the agent attributed its blocked calls to an app
restart on 15 October. The reach fix was queued at the article's revision,
not reported as shipped. The live merge ran on 19 October against a fork
from 5 October. The macOS receipt described banners disappearing after a
few seconds; visibility remained unconfirmed.

This account covers the observations recorded through 19 October 2026.