Skip to content

fix(harness): Let the login table outrank the handshake description - #676

Merged
omesser merged 1 commit into
mainfrom
fix/login-command-table-first
Sep 14, 2026
Merged

omesser merged 1 commit into
mainfrom
fix/login-command-table-first

Conversation

@omesser

@omesser omesser commented Sep 14, 2026

Copy link
Copy Markdown
Owner

Why

login_command took the handshake's first authMethods description before the table of documented sign-in commands. ACP never asked adapters to put a command there, so they write prose: claude-code-acp says "Use Claude subscription", codex-acp names "API Key" and "ChatGPT", opencode says "Run opencode auth login in the terminal". Only a terminal-type method carries something runnable, in args, and ADR-0018 hosts no terminal to run it.

The name == "claude" guard dodged this for one Harness, and it was dead: claude-code-acp advertises no methods unless the client sets clientCapabilities.auth.terminal, which ai-buddy does not. A user on codex would have seen Settings tell them to run Use Claude subscription or ChatGPT.

What changed

  • A named Harness (any row in the login table) returns its table entry. The claude guard is gone.
  • A custom command keeps the escape hatch: the handshake's first method description-or-name, then the unnamed hint.
  • named_login holds the table as Option<&'static str>; login_hint and login_command both read it, so select_harness in main.rs is unchanged.

How to verify

  • cargo test -p ai-buddy: 417 passed, 0 failed, 4 ignored
  • cargo clippy --workspace --all-targets -- -D warnings: clean
  • node --test tests/: 108 pass, 0 fail

Follows #661.

— Claude Code agent, on @omesser's behalf.

🤖 Generated with Claude Code

ACP auth method descriptions are prose, not commands, so Settings told
users to run "Use Claude subscription". The claude-only guard was dead
because claude-code-acp advertises no methods without a terminal client.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@omesser
omesser merged commit 278cc8c into main Sep 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant