Elevator pitch
What are you proposing to change?Add a typed terminal authentication method so a Client can run the configured Agent program interactively for login, then reconnect to the Agent after the login flow succeeds.
Status quo
How do things work today and what problems does this cause? Why would we change things?Agents use several authentication flows. Some can handle login over ACP, while others require users to interact with the Agent’s terminal UI. The baseline
agent authentication method does not tell a Client that it must launch an
interactive program, so users may need to leave the Client and complete setup
manually.
What we propose to do about it
What are you proposing to improve the situation?Add a
terminal authentication method. A supporting Client launches the same
configured Agent program in an interactive terminal, adding arguments and
environment variables supplied by the Agent. After the terminal flow succeeds,
the Client reconnects and reinitializes the ACP Agent.
Terminal authentication is an out-of-band process. The Client does not pass a
terminal method to v1 authenticate or v2 auth/login.
Shiny future
How will things play out once this feature exists?Users can complete an Agent’s interactive login flow without leaving their Client. Agents describe how to enter that flow without knowing the Client-specific path or command used to launch them.
Implementation details and plan
Tell me more about your implementation. What is your detailed implementation plan?
Terminal authentication method
Theterminal discriminator identifies a terminal authentication method. The
descriptor includes:
args(optional, default[]): additional arguments for the configured Agent program.env(optional, default empty): additional environment variables for the terminal process. Descriptor values override same-named variables in the base launch configuration. In v2, everyenventry MUST have a uniquename.
env wire shapes differ between protocol versions.
args and applies env. This keeps
the descriptor independent of Client-specific installation paths and prevents
the Agent from selecting an unrelated program.
Client capability
Clients opt in because terminal authentication requires Client-side process and terminal support.terminal authentication method only when the Client
advertised the corresponding capability.
Login flow
- The Client initializes the ACP connection and receives a
terminalauthentication method. - When the user selects it, the Client launches a separate interactive process
using the configured Agent program and base launch configuration, plus the
descriptor’s
argsandenv. - The Client presents the terminal to the user and waits for the process to exit. Exit status zero signals success; a non-zero status, termination without an exit status, or cancellation signals failure.
- On success, the Client reconnects and reinitializes the ACP Agent, then retries the operation that required authentication.
authenticate or v2
auth/login: the interactive terminal process is not the ACP connection.
In v2, advertising any authentication method requires the Agent to implement
both auth/login and auth/logout, preserving the baseline authentication
surface rule. The standard agent type uses auth/login; terminal does not,
so Clients never pass a terminal method ID to that endpoint.
Frequently asked questions
What questions have arisen over the course of authoring this document or during subsequent discussions?
What alternative approaches did you consider?
The proposal originally included anenv_var method that asked the Client to
collect credentials and restart the Agent with new environment variables. That
model assumes the Client owns the Agent process and does not generalize to
remote transports. Agents using this former experimental method should replace
it with agent or terminal authentication.
Authentication setup could also be included in an Agent’s registry declaration,
making it static rather than negotiated. See the Registry
RFD.
Structured credential collection could instead use an elicitation flow. That
keeps user input inside the Agent’s protocol-driven authentication logic rather
than giving the Client special knowledge of environment variables.
Revision history
The original authentication RFD also discussed elicitation. That material was removed and moved to a separate proposal.- 2026-07-27: Removed the remaining unstable
env_vartypes and made the Rust SDK decode legacy descriptors asagentin both protocol versions. - 2026-07-24: Moved terminal authentication to Preview, defined it as an
out-of-band launch and reconnect flow, removed
env_varfrom v2, and retained the unstable v1 variant for compatibility. - 2026-03-09: Removed
auth_methodsfrom the Error type. - 2026-03-03: Changed
env_varfrom a singlevarNameto a structuredvarsarray ofAuthEnvVarobjects and simplified the field name fromvarNametoname. - 2026-02-27: Updated the proposal to reflect the implementation.
- 2026-01-14: Incorporated Core Maintainer feedback.