Repository navigation
Description
Why
ACP lets a Harness advertise how to log in, in initialize.authMethods. Each
method carries a type, and the two types need opposite handling.
terminal means the client re-runs the agent binary in an interactive terminal.
ai-buddy cannot, and does not claim to: ADR-0018 forbids hosting a terminal, so
we never set clientCapabilities.auth.terminal.
agent means the client sends session/authenticate and the Harness logs itself
in, opening a browser from the child that will hold the token. That is the only
shape an in-app login button could ever use.
We record the name and throw the type away, so the app cannot tell the two apart.
Where
src-tauri/src/acp_wire.rs:1043:
fn auth_hint(method: &AuthMethod) -> AuthHint {
match method {
AuthMethod::Terminal(terminal) => AuthHint {
name: terminal.name.clone(),
description: terminal.description.clone(),
},
AuthMethod::Agent(agent) => AuthHint {
name: agent.name.clone(),
description: agent.description.clone(),
},
_ => AuthHint { name: "sign in".to_string(), description: None },
}
}Both arms produce the same shape. AuthHint is { name, description } and has
no field for which arm made it.
What it costs today
Nothing. The hint is printed, never acted on, so the missing type has never been
needed. The cost is entirely future: any work on an in-app login is blocked here
first, and until this lands nobody can even measure which Harnesses could have
one.
What is measured
One probe attach per installed Harness on 2026-09-25, reading what each
advertises:
| Harness | authMethods |
|---|---|
claude |
none |
codex |
API Key, ChatGPT |
cursor-agent |
Cursor Login |
opencode |
Login with opencode |
goose |
Configure Provider |
hermes |
custom runtime credentials, Configure Hermes provider |
grok |
xai.api_key, cached_token, Grok |
pi |
Launch pi in the terminal |
claude advertises none, so no button is possible for it whatever we build. That
is the Harness in #991, which is what prompted the question.
pi's reads as a terminal method from its name alone. The rest cannot be
classified from here, because the type is exactly what auth_hint discards.
Done when
-
AuthHintrecords whether the method wasAgentorTerminal. - The unknown arm stays distinguishable from both, rather than defaulting
into one. - A test asserts the kind survives for each arm.
- The per-Harness table above can be filled in from what the app holds,
without another instrumented probe run.
Out of scope
Calling session/authenticate, and any login button. This issue only stops
throwing away the fact needed to decide whether either is possible. The prior
decision not to spawn login commands (2026-09-14, #654 / #661) stands: ai-buddy
names the command and the user runs it.
Related, and deliberately separate
#992 has the same shape in the Chat surface. askSays flattens a permission
ask's command, title and kind into one string, so the renderer cannot mark the
command as a command. Both are a struct dropping a distinction its consumer
needs.
They are not the same bug and should not be merged. #992 is presentational and
lives in the Chat renderer. This is a capability question and lives on the ACP
wire. Fixing either does nothing for the other.
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsDone
Activity
omesser commentedon Sep 25, 2026
Duplicate of #1000, which was filed five hours earlier and says the same thing. I missed it when filing.
The one thing here that #1000 did not carry, the measured
authMethodstable across all eight installed Harnesses, is now a comment there. Everything else is covered.— Claude Code agent, on @omesser's behalf.