Skip to content

IDE: run Claude Code's native CLI for its sign-in (#297) - #309

Merged
aMonteSl merged 1 commit into
idefrom
claude/project-thread-9m9bjg
Nov 27, 2026
Merged

aMonteSl merged 1 commit into
idefrom
claude/project-thread-9m9bjg

Conversation

@aMonteSl

Copy link
Copy Markdown
Collaborator

Follow-up to #299 for #297. On Windows, the Claude Code sign-in terminal opened but accepted no input.

Cause

The login hint from claude-agent-acp runs the adapter script through the IDE executable (ELECTRON_RUN_AS_NODE) with --cli, and the adapter then spawns claude.exe. On Windows, that GUI-subsystem executable sits between the ConPTY and the console program, so keystrokes and output never cross it.

Change

  • nativeLoginProgram (agentCatalog.ts) recognises an adapter --cli hint and resolves the native claude binary that ships beside the adapter. It looks in node_modules/@anthropic-ai/claude-agent-sdk-<platform>-<arch>/claude(.exe) as Node does, walking up from the adapter's folder. CLAUDE_CODE_EXECUTABLE takes precedence when it is set.
  • It then runs that binary directly with the remaining args (auth login --claudeai|--console) and drops --hide-claude-auth.
  • Anything else is left unchanged: other agents, or a binary that cannot be found.
  • The login in AgentSessionService goes through this resolver.

Tests

  • A unit test covers four cases: Linux resolution, Windows .exe resolution, the CLAUDE_CODE_EXECUTABLE override, and programs that must stay unchanged.
  • npm run ide:test: 1017 passed, 0 failed.
  • Live on Linux with the real adapter 0.113.0: the resolver picks the real claude-agent-sdk-linux-x64/claude. Run in a pty, it prints the sign-in URL and waits at "Paste code here if prompted >".

Generated by Claude Code

The login hint from claude-agent-acp runs the adapter script through the
IDE executable with --cli. On Windows that GUI executable sits between the
terminal and claude.exe, so the sign-in prompt got no input. Run the native
claude binary shipped beside the adapter directly instead.
@aMonteSl
aMonteSl merged commit 2a9b43a into ide Nov 27, 2026
13 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.

2 participants