- Author(s): @xtmq
- Champion: @benbrandt
Elevator pitch
What are you proposing to change?Add an
auth/status method, an auth/status_update notification, and a corresponding capability that let clients query and follow the agent’s current authentication state. This lets clients determine whether the agent is already configured with credentials or requires authorization before creating a session, without relying on the ambiguous error behavior of session/new, and show which account or credentials the agent is using.
Status quo
How do things work today and what problems does this cause? Why would we change things?Currently, there is no dedicated way for a client to determine whether an agent has valid authentication configured. The typical workaround is:
- Call
initialize - Call
session/new - If the agent has no credentials, it may return an authorization error
- The client handles the error and initiates an authorization flow
- Unreliable detection: The
session/newmethod is not required by the specification to check authorization. Some agents validate credentials eagerly, others do so lazily (e.g., on the first LLM call). The client cannot rely onsession/newto consistently surface auth issues. - Wasted resources: Creating a session only to discard it on auth failure is wasteful, especially if session creation has side effects (resource allocation, logging, history file creation, etc.).
- Poor user experience: The client cannot proactively guide the user through authorization before session creation. Instead, users encounter errors mid-flow.
Shiny future
How will things play out once this feature exists?Clients will be able to:
- Discover whether an agent supports auth state queries via capabilities during initialization
- Query the agent’s current authentication state immediately after initialization
- Make an informed decision about whether to proceed with session creation, initiate an authorization flow, or configure providers (e.g., through the providers API)
- Provide clear, proactive UX — e.g., showing a “Sign in” prompt before any session is created
- Completely skip authentication process if the agent is already authenticated
- Show which credentials and accounts the agent is using, including agents that hold credentials for several providers, and keep that display current when the user signs in or out outside the client
Implementation details and plan
Tell me more about your implementation. What is your detailed implementation plan?
Intended flow
The client callsinitialize, inspects capabilities to confirm auth/status support, then queries auth state before deciding how to proceed.
- Initialization: The client calls
initialize. The agent responds with capabilities, includingauth/statussupport viaagentCapabilities.auth. - Auth state query: The client calls
auth/status. The agent inspects its local configuration, stored credentials, or environment to determine the current auth state. - Client-side decision: Based on the response, the client either proceeds to session creation or initiates an authorization flow first.
- Change notifications: When the agent notices its authentication state changed, for example after
authenticate,logout, or a sign-in in another terminal, it sendsauth/status_updatewith the new state.
Capability advertisement
The agent advertises support for theauth/status method via the existing auth capability in agentCapabilities:
auth/status method
A method that can be called after initialization to query the agent’s current authentication status.
null the same way: the value is not reported. state is required and strict, because clients act on it. Everything in accounts is display information, so a receiver ignores a malformed value, or skips a malformed entry, instead of rejecting the message.
auth/status_update notification
A notification the agent sends when its authentication status changes. It carries the same fields as AuthStatusResponse, as a full snapshot rather than a diff.
Example Exchange
auth/status Request:Behavior
-
Capability advertisement: The agent SHOULD include
auth.statusinagentCapabilitiesif it supports theauth/statusmethod. Clients MUST check for this capability before calling the method. -
Timing: The
auth/statusmethod MUST be callable afterinitialize. It MAY be called multiple times (e.g., afterauthenticate, to re-check state). -
Local checks preferred: The agent MAY determine auth state from locally available information (config files, environment variables, stored tokens) or by making external API calls. Agents SHOULD keep
auth/statusfast; if a check would block, they SHOULD answerunknownand sendauth/status_updateonce the check completes.authenticatedmeans credentials are present, NOT that they are guaranteed to be valid. -
No side effects: Calling
auth/statusMUST NOT modify any agent state. It is a pure query. Agents MUST NOT rejectauth/statuswithauth_required(-32000), since it is how a Client learns that authentication is required. -
Overall state: The top-level
statedescribes whether the agent can start a session with its default configuration without the user signing in. Agents with several accounts reportauthenticatedif the accounts in effect are usable, even if others are not. -
Unknown state: Agents SHOULD return
unknownrather than guessing when they cannot determine their state. Clients MUST treat unrecognizedstatevalues asunknown, and MAY proceed tosession/newand handle anauth_requirederror as they do today. -
Accounts list:
accountsis for display only. Clients MUST NOT use it to decide whether to authenticate. Agents SHOULD list the accounts and credentials they have configured, including API keys, and SHOULD mark the ones in effect withactive: true. Several accounts MAY be active, for example one per provider. Accounts that are missing or need sign-in are not listed; the top-levelstatereports whether the user needs to sign in. Agents MUST NOT include secrets. Clients MUST NOT useaccountsentries or their fields, such asemail, as stable account identifiers, because they can change or be missing. Clients SHOULD NOT log these fields or send them anywhere else, such as telemetry; they are sent only for display. -
Agent-owned credentials only:
accountslists credentials the agent itself holds, not provider configuration the client supplied. How client-supplied providers affect the top-levelstateis left open; see the FAQ. -
Change notifications: Agents that advertise
auth.statusMAY sendauth/status_updateat any time afterinitialize, and SHOULD send it when their status changes, including afterauthenticateorlogout. Agents SHOULD only send it when the reported status differs from the last one sent on the connection. The notification is connection-scoped, never per session. -
Re-checking cached outcomes: A Client MAY treat a change between two snapshots as a reason to re-check an outcome it cached for the earlier snapshot, such as an
auth_requirederror. A change does not identify an account or prove that the credentials are valid. An unchanged snapshot does not prove that the credentials are unchanged.
Implementations
- The Rust SDK and TypeScript SDK expose
auth/statusandauth/status_updatein their unstable APIs for ACP v1 and v2. - To try the query and notification on either protocol version, use
claude-agent-acp0.109.1-preview.4 orcodex-acp2.8.1-preview.1. - Delta queries agents that advertise
auth.statusand follows their updates. The Zed client PR adds support behindacp-beta.
Frequently asked questions
What questions have arisen over the course of authoring this document?
Why not rely on session/new errors?
The session/new method is designed for session creation, not for auth validation. Per the specification, agents are not required to validate credentials during session creation — some agents defer validation to the first actual LLM call. This means a successful session/new does not guarantee the agent is authenticated, and a failed session/new may fail for reasons unrelated to authentication. A dedicated method provides a clear, unambiguous signal.
Why not include auth state in the initialize response directly?
The initialize response contains capabilities — what the agent supports. Auth state is runtime information — what the agent currently has configured. Mixing these concerns would make initialize less predictable. Additionally, auth state may change after initialization (e.g., after signing in or configuring providers), and a separate method allows re-querying.
Why not just check for the presence of environment variables on the client side?
Agents may obtain credentials from many sources: config files, keychains, OAuth tokens, environment variables, or even embedded keys. The client has no visibility into these mechanisms. Only the agent knows whether it has usable credentials configured.Why report accounts, after removing auth details earlier?
An earlier version tried to report state per auth method, or which auth method was used. That mapping is ambiguous: one auth flow can produce several credential types (for example, a browser login that results in an API key).accounts describes what the agent has configured, without referring to authMethods, and is display information only. Clients decide whether sign-in is needed from state. Accounts have no state of their own: nothing links an account to an auth method, so a client could not act on a per-account state, and an empty list could not distinguish not_required, unauthenticated, and unknown.
The shape is based on a survey of how agents and adjacent tools report auth status:
- About half of the agents in the ACP registry hold credentials for several providers at once (for example opencode, goose, cline, Kimi, and pi), and some allow several accounts per provider with one active. A list with an
activemarker covers these as well as single-account agents. CLIs that started with a single account, such asgh auth status, later had to add a list. - Credential kinds, account plans, and credential sources also appear in most agents, but each defines them differently.
labeland the optionaldescriptioncarry this as display text, without standardizing those taxonomies. For example, the Claude adapter reports an API key helper separately from the account label.namestill means the user’s name, not a credential source. - Each entry is called an account even when it is an API key, following VS Code’s authentication API,
gcloud auth list,az account list, andgh auth status, which all list non-person credentials such as service accounts and tokens as accounts. - Existing extensions already report similar data: Junie and the Claude and Codex adapters push an
_auth/status_updatenotification, and mistral-vibe answers anauth/statusextension request. - Fields that are vendor-specific, require network calls, or that no agent reliably exposes to clients are left out: quota and credits, expiry timestamps, and scopes. They can be carried in
_meta.
Why add a notification instead of only a query?
Authentication can change without the client doing anything: the user can sign in or out in another terminal, or a token can expire. Without a notification, clients have to pollauth/status or show an out-of-date state. The notification reuses the response shape as a full snapshot, so clients can query once after initialize and then replace their state with each update.
Why the name description?
Other ACP types pair a short name with an optional description, such as auth methods, session config options, and available commands. The account field follows them. detail is what the Claude and Codex adapters use in their _meta extensions, but no ACP type uses it. subtitle and hint describe a presentation. source is too narrow: the Codex adapter uses the field for a gateway’s provider name.
Why not add a credentials revision?
A Client that caches an outcome, such as anauth_required error, wants to know when the credentials change. An opaque revision would report changes that leave every displayed field identical, but each Agent would have to track that history, including across restarts. Comparing snapshots covers the common cases, such as signing in with another account or switching from a subscription to an API key. A revision can be added later as an optional field.
Why not use a boolean for the state?
A boolean can’t express two cases agents report today. Agents that run local models need no authentication at all, so clients should hide sign-in rather than show “signed in”. And an agent cannot always tell its state: a probe can time out or fail.not_required and unknown cover these. Expired or invalid credentials are reported as unauthenticated, since the client’s response is the same: ask the user to sign in.
How does this relate to the providers API?
The two are complementary.auth/status reports credentials the agent owns, while the providers API lets the client supply its own routing and credentials. A client could show the agent’s signed-in account and also offer to route through the user’s own key or gateway.
How they interact is left open while the providers API is being reworked. In particular, this proposal does not yet say whether client-supplied providers count toward the top-level state, or whether accounts should reference provider identifiers. Both can be specified once the providers API settles, without breaking this shape.
Can auth state differ per session or working directory?
Not in this proposal. Authentication in ACP is connection-wide:authenticate and logout take no session or working directory. Credentials that depend on the project, such as a project-level configuration, are resolved when the session is created and surface through session/new.
For agents where the credential in use depends on the session’s model or provider, accounts lists all of them and active marks the ones the agent uses by default, which may be one per provider. A per-session view, for example a session/update variant, could be added later if clients need it. An optional cwd parameter could be added to auth/status later without breaking existing implementations.
Revision history
- 2026-11-20: Moved to Preview. The capability, request, and notification remain unstable.
- 2026-11-10: Add an optional account
description, and let Clients re-check cached outcomes when the snapshot changes - 2026-10-29: Replace
authenticatedandmessagewithstateand a minimalaccountslist (label,active,name,email,organization), based on a survey of agent auth models; add theauth/status_updatenotification - 2026-10-29: Advertise
auth.statusas a capability object ({}) instead of a boolean, matching other method capabilities - 2026-07-21: Accepted as a Draft RFD
- 2026-03-15: Remove
authMethodsfrom the proposal and keep aggregate auth state only (authenticated+ optionalmessage) - 2026-03-10: Rename
getAuthStatetoauth/status, nest capability underagentCapabilities.auth - 2026-03-07: Address review feedback on auth state structure
- 2026-03-05: Initial draft — preliminary proposal to start discussion