orca icon indicating copy to clipboard operation
orca copied to clipboard

[Bug]: Claude account switching does not work in Remote SSH projects

Open lasiyan opened this issue 4 months ago • 4 comments

Operating system

Windows

Orca version

v1.4.141.0

Details

Short summary

Claude account switching works correctly for local projects, but it does not work for projects opened through Remote SSH.

In a Remote SSH project, newly opened Claude tabs always use the remote system default Claude account, regardless of which account is selected in Orca's status bar.

Environment

  • Local OS: Windows 11
  • Orca version: v1.4.141.0
  • Connection type: Remote SSH
  • Two Claude accounts are registered in Orca

The account selector shows three options:

  • System Default
  • Account A
  • Account B

The current system default Claude account on the remote host is Account A.

Case 1: Local project — works correctly

  1. Select Open Local Project.
  2. Select Account A from the account selector in the status bar.
  3. Open a new tab and start Claude.
  4. Claude starts with Account A active.
  5. Select Account B from the account selector in the status bar.
  6. Open another new tab and start Claude.
  7. Claude starts with Account B active.

Account switching works as expected in the local environment.

Case 2: Remote SSH project — does not work

  1. Select Add Project → Remote Host.
  2. Connect to the remote host and open a remote project.
  3. Select Account A from the account selector in the status bar.
  4. Open a new tab and start Claude.
  5. Claude starts with the remote system default account, which is currently Account A.
  6. Select Account B from the account selector in the status bar.
  7. Open another new tab and start Claude.
  8. Claude still starts with the remote system default account, Account A.

The account selected in Orca's status bar is not applied to Claude sessions created in the Remote SSH environment.

Expected behavior

When Account B is selected in Orca's status bar, a new Claude tab opened in a Remote SSH project should start with Account B, just as it does in a local project.

Alternatively, if account switching is not supported for Remote SSH projects, the account selector should indicate that limitation instead of appearing to switch accounts successfully.

Actual behavior

In Remote SSH projects, all new Claude sessions use the Claude account already authenticated as the remote system default.

Changing the selected account in Orca's status bar has no effect on the account used by the remote Claude session.

Additional information

This appears similar to issue #7973, but the issue is still reproducible in Orca v1.4.141.0 when using the Remote SSH project workflow.

lasiyan avatar Jul 15 '26 02:07 lasiyan

Agent reproduction package (Windows orchestration 2026-07-16)

Host context: Windows 11 / Orca 1.4.143.0 / repo path used: docs/bug-reproductions/
Labels applied: see issue labels (has_repro or cannot_repro).
Security: Do not run user-uploaded binaries from issue attachments. Recreate fixtures from the steps/scripts below.


Issue 8795 — Claude account switching does not work in Remote SSH projects

Status: needs_setup
Host: Windows 11, Orca 1.4.143
Label: none

Summary

Reporter: Claude account selector works for local projects but Remote SSH sessions always start with the remote system-default Claude account (Account A), ignoring Account B selected in the status bar.

Environment gates (this host)

Need Present
≥2 Claude managed accounts in Orca Not verified / likely no multi-account setup
Remote SSH project / environment No (orca environment list → empty; no ~/.ssh/config)
Local Claude CLI Yes — C:\Users\neil\.local\bin\claude.exe 2.1.211

Source notes

  • Account APIs: claudeAccounts:list|select (src/main/ipc/claude-accounts.ts, ClaudeAccountService)
  • Launch env: CLAUDE_CONFIG_DIR / managed auth paths (src/main/rate-limits/claude-fetcher.ts, src/main/daemon/pty-subprocess.ts)
  • Remote sessions need account selection to be forwarded over SSH/relay env, not only local Electron settings

Repro needs (another agent)

  1. Register two Claude accounts in Orca (status bar shows System Default + A + B).
  2. Confirm local project: switch A→B and new Claude tabs follow selection.
  3. Add Remote Host SSH project; open remote workspace.
  4. Select Account B; open new Claude tab on remote.
  5. Expected: Account B. Actual (reporter): always remote default A.

Evidence

  • docs/bug-reproductions/issues/8795.json
  • docs/bug-reproductions/evidence/env-list.json (empty environments)
  • docs/bug-reproductions/evidence/project-list.json (local github:stablyai/orca only)

Why blocked

Cannot exercise Remote SSH Claude launch path without a paired remote and multi-account credentials.


How another agent should use this

  1. Read this comment fully (status, expected vs actual, blockers).
  2. If a script is included above, copy it to a temp file and run it on a Windows 11 host with Orca installed (prefer production install under %LOCALAPPDATA%\Programs\orca).
  3. Capture evidence (CLI --json, screenshots, logs) under a local folder; optionally comment results back here.
  4. If status is cannot_repro / needs_setup, satisfy the listed prerequisites first, then re-attempt and flip labels: remove cannot_repro, add has_repro when conclusive.

OrcaWin avatar Jul 17 '26 00:07 OrcaWin

Reproduced on macOS (recent build), so this is not Windows-specific.

Repro: switch the selected Claude account in the desktop app → open a new Claude tab in an SSH worktree → the session authenticates as the remote host's default ~/.claude account, not the selected one. (Already-running sessions keeping their auth is expected; new tabs picking the wrong account is the bug.)

Why (from source): account selection is applied as a managed CLAUDE_CONFIG_DIR by the local PTY provider only — local-pty-provider.ts even forwards it through WSLENV for managed WSL. The SSH spawn path (ssh-pty-spawn-env.ts) has no Claude-account handling at all, so the selection never reaches remote spawns and the remote CLI falls back to the host's default config dir. Same shape as the Codex-side #8711.

Happy to contribute the Claude-side implementation once the Codex remote-account/home pattern you're landing settles — if there's a direction you'd bless for Claude (managed remote config dirs vs something else), I'd take it up.

choihjin avatar Jul 23 '26 07:07 choihjin

Update after the SSH relay was retired (#27214, #27215): SSH terminals now start inside the host's managed Orca server rather than through the desktop's PTY provider. The symptom still applies. The status-bar switcher targets this computer (or a paired server), so a new Claude tab in an SSH workspace still uses the host's default ~/.claude account.

OrcaWin avatar Oct 11 '26 06:10 OrcaWin

This is fixed on main and shipped in v1.4.261: SSH workspaces now run on the host's managed server, and the Claude account switcher selects and adds accounts on that host (#27687, #31461).

Please update to the latest Orca and try again. If you still see it, comment here and we'll reopen.

AmoabaKelvin avatar Nov 17 '26 22:11 AmoabaKelvin