Skip to content

[codex] Preserve Claude MCP and plugin overrides#232

Merged
SeemSeam merged 2 commits into
SeemSeam:mainfrom
agnitum2009:codex/claude-mcp-lsp-overlays
Jun 18, 2026
Merged

[codex] Preserve Claude MCP and plugin overrides#232
SeemSeam merged 2 commits into
SeemSeam:mainfrom
agnitum2009:codex/claude-mcp-lsp-overlays

Conversation

@agnitum2009

@agnitum2009 agnitum2009 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Allow Claude home materialization to apply per-agent provider_profile.mcp_servers overrides after inheriting source .claude.json MCP config.
  • Support enabled = false as a deletion override for inherited Claude MCP servers.
  • Preserve existing Claude enabledPlugins entries during managed home settings refresh, while letting source settings override same-key plugin states.
  • Add regression tests for inherited MCP removal and plugin enablement preservation.

Why

Claude managed homes inherited root mcpServers from the source home, but ignored per-agent provider profiles. That made it hard for CCB operators to disable duplicate raw browser MCPs for selected Claude agents without editing generated runtime state.

Separately, CCB settings projection only carried forward hooks and permissions. A plugin such as typescript-lsp@claude-plugins-official could remain present in installed_plugins.json and cache, but disappear from enabledPlugins after CCB refreshed the managed Claude home, making Claude prompt for reinstall/re-enable.

Impact

Operators can now use .ccb/ccb.config as the durable source for Claude MCP differences, including removing inherited servers such as raw playwright while keeping other inherited MCPs. Installed Claude plugins also keep their enablement across managed home refreshes unless the source settings explicitly override that plugin key.

Checks

  • /root/.venv/bin/python3 -m pytest -q test/test_provider_profiles.py -k 'claude_home_config_merges_profile_mcp_server_overrides or claude_home_config_preserves_existing_enabled_plugins'\n- /root/.venv/bin/python3 -m py_compile /root/.local/share/codex-dual/lib/provider_backends/claude/launcher_runtime/home.py /home/agnitum/ccb-git/lib/provider_backends/claude/launcher_runtime/home.py\n- git diff --check -- lib/provider_backends/claude/launcher_runtime/home.py test/test_provider_profiles.py\n\n## Not Included\n- No local .ccb/ccb.config changes.\n- No provider runtime home or /root/.claude state changes.\n- No full-suite run.

CCB Codex added 2 commits June 18, 2026 17:16
Claude managed homes inherited root mcpServers from source .claude.json but ignored per-agent provider_profile.mcp_servers, so CCB operators could not disable duplicate raw browser MCPs for Claude agents without editing runtime state.

Constraint: Preserve inherited Claude source config while allowing per-agent operator overrides.
Rejected: Editing runtime provider homes only | overwritten on next home materialization and not reviewable upstream.
Confidence: high
Scope-risk: narrow
Directive: Keep provider_profile.mcp_servers as the durable per-agent MCP override surface for Claude; use enabled=false to remove inherited servers.
Tested: /root/.venv/bin/python3 -m pytest -q test/test_provider_profiles.py -k 'claude_home_config_merges_profile_mcp_server_overrides'
Tested: git diff --check -- lib/provider_backends/claude/launcher_runtime/home.py test/test_provider_profiles.py
Tested: /root/.venv/bin/python3 -m py_compile lib/provider_backends/claude/launcher_runtime/home.py
Not-tested: Full CCB test suite
Claude home refresh projected source settings and only carried forward hooks and permissions, so plugins installed inside a managed Claude home could remain in installed_plugins.json while disappearing from enabledPlugins after CCB restart.

Constraint: Keep source settings authoritative for explicit plugin states while preserving managed-home plugin enablement when the source does not mention a plugin.
Rejected: Reinstalling TypeScript LSP in each Claude home | treats the symptom and is lost on the next settings projection.
Confidence: high
Scope-risk: narrow
Directive: Do not drop existing Claude enabledPlugins during CCB settings materialization; source settings should still override same-key values.
Tested: /root/.venv/bin/python3 -m pytest -q test/test_provider_profiles.py -k 'claude_home_config_merges_profile_mcp_server_overrides or claude_home_config_preserves_existing_enabled_plugins'
Tested: /root/.venv/bin/python3 -m py_compile /root/.local/share/codex-dual/lib/provider_backends/claude/launcher_runtime/home.py /home/agnitum/ccb-git/lib/provider_backends/claude/launcher_runtime/home.py
Tested: git diff --check -- lib/provider_backends/claude/launcher_runtime/home.py test/test_provider_profiles.py
Not-tested: Full CCB test suite
@agnitum2009 agnitum2009 changed the title [codex] Allow Claude profile MCP overrides [codex] Preserve Claude MCP and plugin overrides Jun 18, 2026
@SeemSeam SeemSeam marked this pull request as ready for review June 18, 2026 23:12
@SeemSeam SeemSeam merged commit cf036b2 into SeemSeam:main Jun 18, 2026
14 checks passed
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.

2 participants