Skip to content

fix(agents): skip the Codex and Goose config write when no MCP server changed - #503

Open
fnzko wants to merge 1 commit into
symposium-dev:mainfrom
fnzko:mcp-registration-noop-writes
Open

fnzko wants to merge 1 commit into
symposium-dev:mainfrom
fnzko:mcp-registration-noop-writes

Conversation

@fnzko

@fnzko fnzko commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Once a plugin's MCP servers were registered, every cargo agents sync wrote ~/.codex/config.toml and Goose's config.yaml again with the same content. Sync runs at each session start and both agents write those files themselves, so each rewrite was a chance to lose their change.

Both checks compared text. A Codex entry read back from the file never rendered like a freshly built one, and Goose's section was compared without its indentation against a snippet that had it. They now compare parsed values, so an unchanged entry is reported as already configured and the file is not written. An entry with the same values in another layout is left alone too.

Checked with three syncs in a row in an isolated home (Codex, Goose and Claude Code, one Agent Plugins package with a stdio and an HTTP server): both files keep their modification time after the first.

Take into account:

  • The idempotency tests compared the file's content, which a same-bytes rewrite passes. The new ones check the modification time.
  • Codex plugin registration and Goose plugin delivery already skip a no-op, so they are not touched.
Disclosure questions

AI disclosure.

  • The AI tool authored large parts of the code

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant