Expand description
A signed-in account’s id that is the same on every machine
(docs/specs/SPEC_AGENTS_OPERATE_OTHER_MACHINES_2026_10_30.md §4.4).
An account’s local id is a UUID made when it was added, and its label
(email ·2) is numbered per machine, so two machines that signed in to one
provider account share neither. The stable id is derived from what the
provider says the account is: for Claude, a hash of the OAuth account and
organization ids its CLI recorded (identity_key_from_oauth_dir), so one
email in a personal and a Team organization stays two accounts. Without
those ids it falls back to a hash of the provider and email.
The id is a name, not a secret. It travels to other machines and into logs,
so the provider’s own ids and the email are hashed out of it; but an email
is guessable, so the fallback form can be confirmed against a known address
by anyone who sees the id. Two caveats: a sign-in in the provider’s ambient
home, or one whose .claude.json is unreadable, has no provider ids and gets
the email form, so one provider account can show both forms on different
machines. A matcher across machines treats an email-form id as a weaker
claim and compares the email too.
Functions§
- is_
stable_ id - Whether
idhas the shapestable_account_idmakes: a lower-case provider, a colon and a short token, so a peer cannot put free text where an account id belongs. - stable_
account_ id <provider>:<16 hex>fora, orNonewhen it has neither a provider identity nor an email (an API key, say). The provider is the canonical one, so aclaude-codealias row and aclauderow of one sign-in agree.- stable_
id_ of_ block - For each pane block, the stable id of the account its run is on (
agent:run_account, else the agent’s link): the lookup the LAN agent list reports. The accounts are read once.