You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(mcp): Move leaves a server in agents Orca's list doesn't reach - #49168
"Move to Orca" took an MCP server out of every agent's own settings, assuming Orca would give it back to those agents from its own list. For some agents Orca can't do that yet, for example Gemini CLI (Orca no longer launches it). Those agents simply lost the server. Now Move only takes the server out of agents that really get it from Orca. The others keep their own copy. A server that only those agents have shows "Copy to Orca" instead of "Move to Orca".
Files
Added
Deleted
Net
Test
1
$\color{#1a7f37}{\Huge{\mathbf{+}}}$13
$\color{#cf222e}{\Huge{\mathbf{−}}}$8
$\color{#1a7f37}{\Huge{\mathbf{+}}}$5
Prod
12
$\color{#1a7f37}{\Huge{\mathbf{+}}}$251
$\color{#cf222e}{\Huge{\mathbf{−}}}$53
$\color{#1a7f37}{\Huge{\mathbf{+}}}$198
What Changed
Move takes a server only out of agents whose new sessions on that host get Orca's list. The host decides per agent (listReaches in mcp-servers-import.ts):
Grok, Cursor and Droid: only once the user has let Orca keep its servers in their own MCP file (the existing agent-file consent).
Claude, Codex, OpenCode, Copilot, Pi and Amp: when their terminal launch takes Orca's servers and no launch has recorded a problem (CLI too old for the route, or Claude blocked by the organisation's settings).
Everything else, Gemini CLI today: never, so it keeps its copy.
The rest follows from that decision:
Discover rows carry a new optional removesFrom. It lists the agents Move takes the server out of, and Claude account profile copies go only when Claude is among them.
Confirm text, desktop and phone: the existing "Orca removes it from {{agents}} settings" now names only those agents.
Copy-only rows: a row with no such agent offers "Copy to Orca" in place of Move. Desktop shows it as the button; the phone hides Move in the row menu. "Move all" leaves those rows out.
No duplicates: an import that takes no agent copy out (a Copy, or a Move of a row left behind) reuses an identical server already in Orca instead of adding name-2. A Move that does take copies out still adds its own entry, scoped like those copies, so an existing entry that reaches less can never stand in for them. The lookup skips plugin entries and entries with a saved sign-in or headers.
Cheap reads: the consent and duplicate checks read the host list's file without opening the credential store, and only when the answer is used.
Product call made here (the ticket left it open): until Orca's launches reach an agent, Move leaves that agent's copy in place. I rejected two alternatives. Refusing Move outright would block consolidating servers for the agents Orca does reach. Turning on agent-file consent as a side effect of Move would write to Cursor, Grok or Droid files without the user's separate yes.
Why
Move assumed every agent with a copy would get the server back from Orca's list at launch. Discovery reads ten agents' files, but Orca launches only some of them with its list. Gemini CLI support was removed in #48447. File-based agents need the user's consent. A launch can learn that an agent's CLI can't take the servers. So "removes it from Gemini CLI settings" deleted a working server with nothing replacing it. The host already knows which agents its launches reach (terminal adapters, recorded agent problems, file consent), so the decision is made there once. Desktop, phone and older clients all follow it: an older client that doesn't know removesFrom still triggers the same host-side Move.
Linked Issue
STA-18122
Visual Proof
Settings → MCP servers → "In your agents". GitHub is in Claude Code, Codex and Gemini CLI; Figma is only in Gemini CLI.
Before
After
Before, Figma offered Move, which deleted it from Gemini CLI. After, it offers Copy. GitHub's Move confirm now reads "Orca removes it from Claude Code and Codex settings" and leaves Gemini's copy.
To try it (with ORCA_MCP_SERVERS=1):
Add the same server to ~/.claude.json and ~/.gemini/settings.json.
Open Settings → MCP servers and Move it.
~/.gemini/settings.json is unchanged, and Copy on the remaining Gemini row doesn't add name-2.
Dev build: worktree ~/orca/workspaces/orca/w-rb-mcp-move, branch fix/mcp-move-keeps-unreached-agent-copies.
Testing
agent-mcp-config-removal.test.ts: Move of a server in Claude, Codex and Gemini takes it out of Claude and Codex only, and Gemini's file stays byte-identical. Without the change Gemini's entry is removed, and the test fails.
pnpm check:changed passes (format, lint, typecheck for node/web/mobile, ratchets, tests). Fixture screenshots above via pnpm fixtures:shot.
macOS only; the decision runs on the execution host, so SSH and paired servers get the same rule.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Performance
None, because:
Discover reads the host list file once (no credential store) and only when it found servers.
Copy reads it only to find an identical server.
Move reads it once.
Nothing here scales with worktrees, terminals or agents, and nothing runs while idle.
Risk
Claude after a restart: whether Claude is blocked by its organisation is only known after a Claude launch or check since Orca started. A Move before any Claude launch still treats Claude as reached. This is the same as before this PR, and the .bak keeps the entry.
Older phones: they ignore removesFrom, so their confirm names every agent while the host removes fewer. That errs on the safe side.
A plain revert restores the old "remove from every agent" Move.
Level: Medium
AI Disclosure
Review
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Mixed versions:
New client with an old host: removesFrom is absent, and clients fall back to agents, matching what that host does.
Old client with a new host: the extra field is ignored.
Known follow-ups (P2):
A server whose agent copy carries headers can't be matched to Orca's saved entry, so a Copy of a leftover row can still add name-2.
Claude's org-settings refusal isn't remembered across restarts.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
I stated the risk: what could break, for whom, and how to back it out
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
Move took a server out of every agent's own config, though Orca never
launches Gemini CLI with its list, Grok/Cursor/Droid get it only once the
user lets Orca into their file, and an agent whose launches learned they
can't take the servers gets none. Those agents lost a working server. Move
now removes it only from agents whose sessions on that host get Orca's list,
names just those in its confirm, and a server only such agents have offers
Copy instead.
…y; read agent-file consent alone
A server moved while an agent Orca's list doesn't reach kept its copy is still
listed, so a second Move or Copy added it again as name-2. Import now reuses
the host list's server with the same definition. The consent read behind
Move's reach no longer opens the host list's servers and sign-ins.
… out
Reusing a server Orca already had and then removing the agents' copies could
leave an agent without it when Orca's entry is narrower (off for that agent,
other workspaces, a plugin's, other saved headers). A Move that takes copies out
adds its own entry scoped like them; reuse is for imports that keep every copy,
and skips plugin entries and ones with a saved sign-in or headers.
… alone
The duplicate check opened every saved sign-in on each Copy, and the consent
read ran even with nothing discovered or for a Copy that never uses it. Both
now read the host list's file without the credential store, and only when
their answer is used.
The change adds agent-list reachability data to discovered MCP servers and uses it to select which agent configurations a Move operation removes. Copy operations leave agent copies in place. The renderer and mobile UI use the removal targets to determine available actions and confirmation text.
Merge Risk: Low · up to 28220
Move to Orca now removes agent copies only for agents that receive Orca's server list. In a narrow race, such as consent being withdrawn or a launch problem being recorded while the add is in progress, a copy could still be removed from an agent that no longer receives the list. The added Orca entry remains. Merge risk is low, and re-checking reach after the add would close the gap.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: Move to Orca no longer removes an MCP server from agents that Orca's server list does not reach. The changeset implements this through the removesFrom list, the listRe…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description follows the template closely and is mostly complete. It has an ELI5, a detailed What Changed section, a Why section with the alternatives considered, a linked issue (STA-18122), visual…
Full details: Title check
Explanation
The title names the main change: Move to Orca no longer removes an MCP server from agents that Orca's server list does not reach. The changeset implements this through the removesFrom list, the listReaches host decision, copy-only rows, and the confirm text. The title is specific and concise, and the 66-character length is acceptable. It uses the conventional fix(mcp) prefix, which is a minor style point and does not affect the result.
Full details: Description check
Explanation
The description follows the template closely and is mostly complete. It has an ELI5, a detailed What Changed section, a Why section with the alternatives considered, a linked issue (STA-18122), visual before/after proof, a testing section, a performance line, a risk section with a level and rollback path, and a checklist. The gaps are minor. The Linked Issue section does not use the template's 'Fixes #' form, the Testing section does not say which platforms were tested beyond macOS, the 'Review' and 'AI Disclosure' headings are empty, and the final lint/typecheck/test/build checklist item is unchecked. The Testing section also cites a unit test that the author says fails without the change, which is a stated check. None of these gaps make the description incomplete.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
"Move to Orca" took an MCP server out of every agent's own settings, assuming Orca would give it back to those agents from its own list. For some agents Orca can't do that yet, for example Gemini CLI (Orca no longer launches it). Those agents simply lost the server. Now Move only takes the server out of agents that really get it from Orca. The others keep their own copy. A server that only those agents have shows "Copy to Orca" instead of "Move to Orca".
What Changed
Move takes a server only out of agents whose new sessions on that host get Orca's list. The host decides per agent (
listReachesinmcp-servers-import.ts):The rest follows from that decision:
removesFrom. It lists the agents Move takes the server out of, and Claude account profile copies go only when Claude is among them.name-2. A Move that does take copies out still adds its own entry, scoped like those copies, so an existing entry that reaches less can never stand in for them. The lookup skips plugin entries and entries with a saved sign-in or headers.Product call made here (the ticket left it open): until Orca's launches reach an agent, Move leaves that agent's copy in place. I rejected two alternatives. Refusing Move outright would block consolidating servers for the agents Orca does reach. Turning on agent-file consent as a side effect of Move would write to Cursor, Grok or Droid files without the user's separate yes.
Why
Move assumed every agent with a copy would get the server back from Orca's list at launch. Discovery reads ten agents' files, but Orca launches only some of them with its list. Gemini CLI support was removed in #48447. File-based agents need the user's consent. A launch can learn that an agent's CLI can't take the servers. So "removes it from Gemini CLI settings" deleted a working server with nothing replacing it. The host already knows which agents its launches reach (terminal adapters, recorded agent problems, file consent), so the decision is made there once. Desktop, phone and older clients all follow it: an older client that doesn't know
removesFromstill triggers the same host-side Move.Linked Issue
STA-18122
Visual Proof
Settings → MCP servers → "In your agents". GitHub is in Claude Code, Codex and Gemini CLI; Figma is only in Gemini CLI.
Before, Figma offered Move, which deleted it from Gemini CLI. After, it offers Copy. GitHub's Move confirm now reads "Orca removes it from Claude Code and Codex settings" and leaves Gemini's copy.
To try it (with
ORCA_MCP_SERVERS=1):~/.claude.jsonand~/.gemini/settings.json.~/.gemini/settings.jsonis unchanged, and Copy on the remaining Gemini row doesn't addname-2.Dev build: worktree
~/orca/workspaces/orca/w-rb-mcp-move, branchfix/mcp-move-keeps-unreached-agent-copies.Testing
agent-mcp-config-removal.test.ts: Move of a server in Claude, Codex and Gemini takes it out of Claude and Codex only, and Gemini's file stays byte-identical. Without the change Gemini's entry is removed, and the test fails.pnpm check:changedpasses (format, lint, typecheck for node/web/mobile, ratchets, tests). Fixture screenshots above viapnpm fixtures:shot.macOS only; the decision runs on the execution host, so SSH and paired servers get the same rule.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Performance
None, because:
Nothing here scales with worktrees, terminals or agents, and nothing runs while idle.
Risk
.bakkeeps the entry.removesFrom, so their confirm names every agent while the host removes fewer. That errs on the safe side.A plain revert restores the old "remove from every agent" Move.
Level: Medium
AI Disclosure
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Mixed versions:
removesFromis absent, and clients fall back toagents, matching what that host does.Known follow-ups (P2):
name-2.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)