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 only the agents its confirm named; an unchanged Copy refreshes nothing - #49290
Three fixes to "Move to Orca" and "Copy to Orca" for MCP servers:
Move removes only what the confirm named. Move could take a server out of an agent the confirm never mentioned, if that agent started getting Orca's list between the confirm and the click. Now Move removes only from the agents the confirm showed.
An unchanged Copy is quiet. Copying a server Orca already has used to make every open settings page and the agent-file sync redo their work. Now it does nothing.
Fewer file reads. Listing servers that live only in terminal agents' configs no longer reads the Grok/Cursor/Droid consent.
Files
Added
Deleted
Net
Test
1
$\color{#1a7f37}{\Huge{\mathbf{+}}}$18
0
$\color{#1a7f37}{\Huge{\mathbf{+}}}$18
Prod
8
$\color{#1a7f37}{\Huge{\mathbf{+}}}$69
$\color{#cf222e}{\Huge{\mathbf{−}}}$26
$\color{#1a7f37}{\Huge{\mathbf{+}}}$43
What Changed
mcpServers.move takes an optional agents: the agents the confirm named. Desktop and the phone send the row's removesFrom. moveAgentMcpServer takes the server out only of copies whose agent was confirmed and is still reached after the add. With nothing to take out, it doesn't re-read reach at all. Older clients omit agents and keep the host-computed set, and older hosts ignore the key.
mcpServers.copy announces mcpServersChanged (and reconciles shared processes) only when the host list was written, through the existing onHost(..., 'written'). Move keeps its announcement on every finished Move, so clients never keep a row Move removed.
hostListReaches reads the Grok/Cursor/Droid consent only when one of those agents is among the agents asked. Discovery and Move pass the agents in play.
Why
All three come from the same Move/Copy path.
Move: the confirm and the host each computed "which agents" at different moments. Binding the removal to what the user saw, then narrowing it by current reach, means the user is never surprised and an agent that lost reach still keeps its copy.
Copy: an unchanged Copy wrote nothing, but it announced a change anyway. The 'written' mode already existed for exactly this.
Consent read: the predicate eagerly read the consent file for agents that never consult it.
Linked Issue
STA-18427, STA-18428, STA-18429
Visual Proof
N/A: no visible change. The confirm text and rows are the same; only what the host removes and announces changed.
Testing
agent-mcp-config-removal.test.ts "takes a server out of only the agents its confirm named": Claude and Codex are both reached, and the confirm named Codex. ~/.claude.json stays byte-identical. It fails on main, where Claude's copy is removed.
Counts through the real RPC handlers with a temporary harness (not committed), at N=5 and 10N=50 Codex-only servers:
Operation
main (N / 10N)
this PR (N / 10N)
Notifications for N unchanged Copies
5 / 50
0 / 0
Consent reads per terminal-only discovery
1 / 1
0 / 0
Consent reads for N terminal-only Moves
10 / 100
0 / 0
An independent pass at N=100 and 10N=1,000 matched these.
pnpm check:changed passes.
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
This removes work and adds none. An unchanged Copy goes from 1 host-wide announcement (each connected client re-reads list and discovery, and the agent-file sync runs a pass) to 0. Terminal-only discovery goes from 1 consent read to 0, and terminal-only Move from 2 to 0. The counts are above.
Risk
The riskiest part is the new optional agents on mcpServers.move.
Mixed versions: a client that sends it to an older host has it stripped, and gets that host's old behaviour. An older client omits it and gets this host's reach-based set, as before.
Revert: a plain revert.
Level: Low
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
Runs on the execution host, so local, SSH and paired servers behave the same.
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)
…imports
The confirm named one set of agents while the host removed from the set it
computed at Move time, so an agent whose reach came back meanwhile lost its
copy unasked. Clients now send the agents the confirm named and the host takes
the server out of only those it still reaches. Move and Copy announce a change
only when the host list was written, so an unchanged Copy refreshes nothing,
and Grok/Cursor/Droid consent is read only when one of them has a copy.
Announcing only on a host-list write could drop the announcement for a Move
whose removals finished after another change was announced, leaving clients
with the removed row. Move keeps its own announcement; only an unchanged Copy
stays quiet.
No actionable comments were generated in the recent review.
Walkthrough
Move requests now pass discovered source agent IDs through the runtime to the importer. The importer limits removal candidates and reachability checks to the applicable agents. The move parameter schema allows an optional list of up to 64 agent IDs. Copy notifications now depend on whether a list write occurred and was already announced.
Merge Risk: Minimal · up to f78ac · assessed changes only
Path filters excluded changed files. This rating applies only to the assessed changes.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: Move now removes a server only from the agents its confirm named, and an unchanged Copy no longer triggers refreshes. Both points match the changeset (move/copy handli…
Description check
The description follows the template closely. It has ELI5, What Changed, Why, Linked Issue (STA-18427/18428/18429, not a GitHub issue link), Visual Proof marked N/A with a reason, Testing with a speci…
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.
Full details: Title check
Explanation
The title names the main change: Move now removes a server only from the agents its confirm named, and an unchanged Copy no longer triggers refreshes. Both points match the changeset (move/copy handling, removesFrom scoping, copy announcement gated on a list write). The title is slightly long and packs two changes into one line, but it is specific and related to the code.
Full details: Description check
Explanation
The description follows the template closely. It has ELI5, What Changed, Why, Linked Issue (STA-18427/18428/18429, not a GitHub issue link), Visual Proof marked N/A with a reason, Testing with a specific test and measured counts, Performance with a concrete statement, Risk with level and revert path, and the Checklist. Gaps: the 'Fixes #' issue line is not filled in with a GitHub issue reference, the AI Disclosure section is empty, and the final pnpm lint/typecheck/test/build checkbox is unchecked. The author also did not state manual testing. These gaps are non-critical, so the check passes.
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; 4 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 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
Three fixes to "Move to Orca" and "Copy to Orca" for MCP servers:
What Changed
mcpServers.movetakes an optionalagents: the agents the confirm named. Desktop and the phone send the row'sremovesFrom.moveAgentMcpServertakes the server out only of copies whose agent was confirmed and is still reached after the add. With nothing to take out, it doesn't re-read reach at all. Older clients omitagentsand keep the host-computed set, and older hosts ignore the key.mcpServers.copyannouncesmcpServersChanged(and reconciles shared processes) only when the host list was written, through the existingonHost(..., 'written'). Move keeps its announcement on every finished Move, so clients never keep a row Move removed.hostListReachesreads the Grok/Cursor/Droid consent only when one of those agents is among the agents asked. Discovery and Move pass the agents in play.Why
All three come from the same Move/Copy path.
'written'mode already existed for exactly this.Linked Issue
STA-18427, STA-18428, STA-18429
Visual Proof
N/A: no visible change. The confirm text and rows are the same; only what the host removes and announces changed.
Testing
agent-mcp-config-removal.test.ts"takes a server out of only the agents its confirm named": Claude and Codex are both reached, and the confirm named Codex.~/.claude.jsonstays byte-identical. It fails on main, where Claude's copy is removed.Counts through the real RPC handlers with a temporary harness (not committed), at N=5 and 10N=50 Codex-only servers:
An independent pass at N=100 and 10N=1,000 matched these.
pnpm check:changedpasses.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
This removes work and adds none. An unchanged Copy goes from 1 host-wide announcement (each connected client re-reads list and discovery, and the agent-file sync runs a pass) to 0. Terminal-only discovery goes from 1 consent read to 0, and terminal-only Move from 2 to 0. The counts are above.
Risk
The riskiest part is the new optional
agentsonmcpServers.move.Level: Low
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
Runs on the execution host, so local, SSH and paired servers behave the same.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)