[codex] Preserve Claude MCP and plugin overrides#232
Merged
SeemSeam merged 2 commits intoJun 18, 2026
Conversation
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
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.
Summary
provider_profile.mcp_serversoverrides after inheriting source.claude.jsonMCP config.enabled = falseas a deletion override for inherited Claude MCP servers.enabledPluginsentries during managed home settings refresh, while letting source settings override same-key plugin states.Why
Claude managed homes inherited root
mcpServersfrom 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-officialcould remain present ininstalled_plugins.jsonand cache, but disappear fromenabledPluginsafter CCB refreshed the managed Claude home, making Claude prompt for reinstall/re-enable.Impact
Operators can now use
.ccb/ccb.configas the durable source for Claude MCP differences, including removing inherited servers such as rawplaywrightwhile 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.configchanges.\n- No provider runtime home or/root/.claudestate changes.\n- No full-suite run.