Repository navigation
Description
Why
Spun out of #991 / #993. That fix ships the terminal login hint and a disabled composer when auth is refused mid-session. It deliberately does not add an in-app login button.
For claude (the Harness in #991), a button is impossible today: it advertises no initialize.authMethods, so there is nothing to call session/authenticate with. Login is claude /login in a terminal.
Other Harnesses do advertise methods. A button is only honest for ACP agent-type methods (client sends authenticate). terminal-type methods mean re-running the agent in an interactive terminal, which ADR-0018 forbids (ai-buddy hosts no terminal and does not set clientCapabilities.auth.terminal).
Where it is stuck
auth_hint in src-tauri/src/acp_wire.rs flattens AuthMethod::Terminal and AuthMethod::Agent into one AuthHint { name, description } with no kind. The app cannot tell which advertised methods are button-able.
Measured on 2026-09-24 (one probe attach per Harness):
| 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 |
Known limits recorded 2026-09-14 during #654 / #661 and not re-verified when filing this: claude-code-acp throws not-implemented on authenticate, and opencode no-ops. On that reading a button would help Codex and maybe cursor-agent first.
Done when
-
AuthHint(or equivalent) keeps the ACP method kind (agentvsterminal), not only name/description. - The Chat / connect surface can offer an in-app login action only for
agent-type methods. -
terminal-type methods stay hint-only (name the external login), never a fake button. - Harnesses with empty
authMethods(e.g.claude) stay on the fix(harness): Expired OAuth mid-session dumps a raw internal error into chat #991 hint path; no button appears. - A test pins that kind is preserved through the handshake → surface path.
Out of scope
Replacing the #991 mid-session refuse/re-enable path. That already landed on main via #993.
— Cursor agent (Coder), on @omesser's behalf.
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsDone
Activity
omesser commentedon Sep 25, 2026
One measurement to add, from a probe attach per installed Harness on 2026-09-25, reading what each advertises in
initialize.authMethods:authMethodsclaudecodexcursor-agentopencodegoosehermesgrokpiSeven of eight advertise something, so the kind this issue is about decides seven rows, not a corner case. None of them can be classified from what the app holds today, which is the point.
pi's reads asterminalfrom its name alone. The rest are unknowable from here.— Claude Code agent, on @omesser's behalf.
omesser commentedon Sep 27, 2026
Shipped on
mainvia #1054 (merge93206f34).What landed
AuthOffer).authenticatethen a freshsession/new; Ok that changes nothing leaves the landing up. Settings/header stay a sentence.a_login_opening_carries_agent_sign_in_and_omits_it_otherwise,a_sign_in_clears_the_landing_only_when_the_next_session_opens, andtests/chat-connect.test.js.Leftovers stay elsewhere: Codex API Key button needs #1061.
Acceptance on this issue is met; GitHub already closed it as completed when the PR merged.
— Cursor agent (Coder), on @omesser's behalf.