fix: use plain orca CLI shim for Claude Agent Teams on SSH remotes#6586
Conversation
For SSH-connected repos, the agent launch platform resolves to 'linux', which made buildAgentStartupPlan emit `orca-ide claude-teams` for the claude-agent-teams agent. The `orca-ide` rename exists only to avoid shadowing the GNOME Orca screen reader on a LOCAL Linux desktop install. On an SSH remote the relay deploys the CLI shim solely as `orca` (Unix), so `orca-ide` is not on PATH and the relay rejects `claude-teams` with "Unsupported SSH Orca CLI command: claude-teams" — the agent never starts. Thread an `isRemote` flag through launch-command resolution so the Linux-only `orca-ide` wrapper is skipped for remote execution; remotes always use the plain `orca` shim. The win32 `orca.cmd` override is kept (the remote Windows shim is also `orca.cmd`). Local macOS/Linux/Windows and WSL behavior is byte-for-byte unchanged. Fixes #6500
|
Warning Review limit reached
More reviews will be available in 27 minutes and 16 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (18)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
EvidenceUnit tests (
|
🧑🤝🧑 Impact & ELI5
1) What's broken today (ELI5). If you connect a project to a remote machine over SSH and pick "Claude Agent Teams" as your agent, then add a new worktree, the agent just fails to start. The remote logs spit out
Unsupported SSH Orca CLI command: claude-teamsand nothing happens. It's a hard blocker — not a glitch you can work around — but only for a specific group: people running Claude Agent Teams on a Linux machine over SSH. Local users, and people using other agents, are unaffected. (Reported in #6500 on v1.4.101.)2) What this PR does (ELI5). Orca starts agents by typing a command on the target machine. On a local Linux desktop it deliberately uses the name
orca-ideinstead oforca, because plainorcawould collide with the built-in GNOME "Orca" screen-reader program. The bug was that Orca used that same renamedorca-idecommand on remote machines too — but a remote machine only ever has the plainorcacommand installed, so the renamed one points at nothing. Think of it like mailing a letter to someone's nickname when the post office over there only knows their legal name. This PR teaches Orca to notice "this is a remote SSH machine" and send the plainorca claude-teamscommand in that case, while still usingorca-ideon a real local Linux desktop. So it now sends a command the remote actually recognizes, instead of one it rejects.3) Tradeoffs / regressions — honest answer. No regressions — nothing is disabled, no new setup, and no existing behavior is lost. The change only fires in exactly one situation: an SSH-remote Linux machine running the one agent (Claude Agent Teams) that uses the platform-specific name. Everything else is byte-for-byte identical: local Linux still gets
orca-ide(the screen-reader workaround is preserved and explicitly tested), Windows remotes still getorca.cmd, macOS is untouched, WSL stays on the local path, and any user-defined command override still wins. The one thing reviewers should actually check is breadth, not danger: the fix threads a singleisRemoteboolean through many launch call sites (worktree reopen, quick-launch, background sessions, the composer, source-control actions, etc.), so the real risk is a missed call site that would leave that path still broken — not a path made worse. No performance cost, no extra API calls, no default changed.Summary
Fixes #6500.
Adding a worktree to an SSH-connected project with Claude Agent Teams selected queued the wrong default agent command:
orca-ide claude-teamsinstead oforca claude-teams. On the remote this fails — the relay printsUnsupported SSH Orca CLI command: claude-teamsand the agent never starts.Root cause: for SSH-connected repos,
getAgentLaunchPlatformForReporeturns'linux'. That platform flows intogetTuiAgentLaunchCommand, which forclaude-agent-teamspickslaunchCmdByPlatform.linux = "orca-ide claude-teams". Theorca-idename exists only to avoid shadowing the GNOME Orca screen reader (/usr/bin/orca) on a local Linux desktop install. On an SSH remote there is no such binary: the relay deploys the CLI shim solely asorca(Unix) viabuildRemoteCliShim, and onlyorca-prefixed commands are routed to the relay CLI. Soorca-ide claude-teamsis not on PATH, andclaude-teamsis not in the relay's supported command switch (ssh-remote-orca-cli.ts), hitting the default branch that throws the reported error. Windows SSH remotes were already fine because the remote shim isorca.cmd, matching the win32 override.Fix: thread an
isRemote(SSH) flag through launch-command resolution. WhenisRemote && platform === 'linux',getTuiAgentLaunchCommandskipslaunchCmdByPlatform.linuxand returns the plainlaunchCmd(orca claude-teams). The win32orca.cmdoverride is preserved (the remote Windows shim is alsoorca.cmd). Callers computeisRemote = Boolean(repo.connectionId)via a small sharedrepoIsRemotehelper — SSH = remote; WSL/local stay false — so all non-SSH behavior is byte-for-byte unchanged.claude-agent-teamsis the only agent usinglaunchCmdByPlatform, so the behavior change is scoped to it.Screenshots
This is a launch-command (string) defect with no standalone visual surface; the verifiable artifact is the queued command. Evidence (run against the live
nwparker/fix-6500dev build over CDP, plus unit tests) is posted as a PR comment. A running-app screenshot is attached in that comment.Testing
pnpm lint(ranoxlinton all changed files — clean)pnpm typecheck(rantsgo --noEmitfor node + web + cli configs — clean)pnpm test(ran the affected vitest files — pass)pnpm buildScoped commands actually run:
oxlint <changed files>— cleantsgo --noEmit -p config/tsconfig.node.json/config/tsconfig.tc.web.json/config/tsconfig.tc.cli.json— cleanvitest run src/shared/tui-agent-startup.test.ts— 33 passed (added remote-Linux, remote-Windows, explicit local-Linux cases)AI Review Report
Reviewed correctness, edge cases, cross-platform, and security adversarially.
metaKey. Theorca-ide(Linux) vsorca.cmd(Windows) vsorcadistinction is preserved exactly per platform; only the Linux-remote case changes. Verified the remote Windows shim isorca.cmd(so win32 remote stays correct) and thatisRemotederives fromconnectionId(SSH), keeping WSL and native macOS/Linux/Windows untouched.buildRemoteCliShim) and the relay CLI command switch.claude-agent-teamsis the only agent withlaunchCmdByPlatform, so no other agent's command changes.cmdOverridesstill win over the platform lookup, so user overrides are unaffected. Resume paths (buildAgentResumeStartupPlan) were intentionally left untouched becauseclaude-agent-teamsis not aResumableTuiAgent.seedCommandCodeSubmittedPromptStatusintocommand-code-prompt-status-seed.tsto keeplaunch-agent-in-new-tab.tsunder the 300-line lint limit without amax-linesdisable.Security Audit
The change only threads a boolean and selects between two pre-existing static command strings (
orca claude-teamsvsorca-ide claude-teams). No new shell construction, no user-input interpolation, noeval, no network, no filesystem, no secrets, no new dependencies, no IPC surface.repoIsRemotereadsrepo.connectionIdonly. No injection surface introduced.Notes
claude-agent-teamsnow passisRemote: worktree reopen, quick-launch new tab, background sessions, the new-workspace composer (incl. quick-create), GitHub work-item background requests, direct work-item launch, source-control AI action plan/preview, folder-workspace composer, and the main-process runtime startup/draft/mobile-session builders.getAgentLaunchPlatformForReporeturning a bare platform loses the local-vs-remote-Linux distinction at the type level; a small{ platform, isRemote }result type could remove the need to recomputeisRemotealongside it at each call site.Made with Orca 🐋