Repository navigation
fix(mcp): stop conflict resolution looping between Agents - #919
Merged
Merged
Conversation
When Agents hold different definitions of one server, importing one Agent's version was refused with "unresolved conflicts prevented adoption", because any conflict in the plan blocked it, including another Agent's. The source was saved anyway, so the Agents that had matched the old definition now conflicted, and importing from them flipped the source back. Replace with source sent one resolution at a time, so with two conflicts the plan stayed blocked and the dialog could never apply. Gate adoption only on the resolved entries' own conflicts, in the API save and in the interactive CLI import. Replace with source now settles every conflict of that server at once. After a conflict import, a translated hint names the Agents in the same scope that still need Replace with source, and the remaining adoption error is translated.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Type
proposals/only — see CONTRIBUTING.md)approvedlabel)Linked Issue
None. Reported directly by the maintainer.
Problem
Claude and Codex held
codegraphascodegraph serve --mcp, and Antigravity held an absolute path. The MCP dashboard could not settle this:source saved; unresolved conflicts prevented adoption. The save path refused adoption when any entry in the plan conflicted (internal/mcp/mutate.go), including another Agent's. Antigravity matched the old source, so it now conflicted. Import from Antigravity flipped everything back.blockedand its apply button stayed disabled.Change
Plan.ResolutionConflictschecks only the entries the resolutions name. Both the save-only API path (MutateBatch) and the interactive CLI import (reviewMCPMutations) use it. Another Agent's conflict no longer stops the import. It stays a conflict of its own.replaceresolution for every resolvable conflict of that server. The preview lists every file it overwrites before apply, and backups are kept as before.mcp.projectsroot) still conflict on that server, a warning toast names them and says to choose Replace with source.source saved; unresolved conflicts prevented adoptionis now translated when it still occurs, which happens when the imported Agent's own entry differs.how-to/daily-tasks/sharing-mcp.mdandreference/commands/mcp.md.Not covered
Checklist
make check) — for code changesChecks run
In a devcontainer-image container:
make checkgo test ./internal/mcp ./cmd/skillshare ./internal/serversrc/pages/MCPPage.test.tsxandsrc/components/mcp/tsc -bpython3 scripts/ai-context.py checkThe three new regression tests fail on
mainand pass here:TestImportAdoptsDespiteAnotherAgentsConflictTestMCPImportSavesDespiteAnotherAgentsConflictNot run: the website build, and a manual dashboard screenshot.