Summary
src/installer/targets/codex.ts still claims Codex CLI has no project-local config concept, but OpenAI Codex has since added a first-class project config layer (.codex/config.toml in the repo root). This makes the global only label stale and prevents per-project installs for Codex users.
Evidence
The supportsLocation('local') => false logic traces back to this comment in codex.ts:
"Codex CLI as of 2026-05 has no project-local config concept — everything lives under ~/.codex/."
That is no longer accurate:
-
Official layering model — codex-rs/config/src/loader/README.md in openai/codex documents the config layer stack, where Project config (.codex/config.toml) is layer 4, above the user config layer (~/.codex/config.toml, layer 6). Layers merge recursively top-over-bottom.
-
mcp_servers is read from the merged effective config — codex-rs/core/src/mcp.rs builds McpConfig via runtime_config(&Config) where Config is the merged layer stack output, and configured_mcp_servers / effective_mcp_servers consume that catalog. So a [mcp_servers.codegraph] table in a project's .codex/config.toml is honored, project-scoped.
-
Verified on Codex CLI 0.147.0 (2026-08): an MCP server declared in <project>/.codex/config.toml shows up in codex mcp list inside that project and nowhere else.
Suggested change
CodexTarget.supportsLocation('local') → return true (optionally version-gated: only for Codex builds that ship the project layer, with a graceful fallback to global for older ones).
local install should write [mcp_servers.codegraph] to <project>/.codex/config.toml and the marker-fenced CodeGraph section to the project-root AGENTS.md (mirroring the opencode target's local behavior — Codex already reads project-root AGENTS.md).
uninstall --location=local should roll those back, and detect(loc) should check <project>/.codex/config.toml for an existing [mcp_servers.codegraph] table.
Why it matters
CodeGraph's whole install story is "wire up only the agents you use, per project when possible". Codex is currently the one agent that forces a global install, which leaks the MCP server into every Codex session on the machine — exactly what the local location exists to avoid.
Summary
src/installer/targets/codex.tsstill claims Codex CLI has no project-local config concept, but OpenAI Codex has since added a first-class project config layer (.codex/config.tomlin the repo root). This makes theglobal onlylabel stale and prevents per-project installs for Codex users.Evidence
The
supportsLocation('local') => falselogic traces back to this comment incodex.ts:That is no longer accurate:
Official layering model —
codex-rs/config/src/loader/README.mdin openai/codex documents the config layer stack, whereProjectconfig (.codex/config.toml) is layer 4, above the user config layer (~/.codex/config.toml, layer 6). Layers merge recursively top-over-bottom.mcp_serversis read from the merged effective config —codex-rs/core/src/mcp.rsbuildsMcpConfigviaruntime_config(&Config)whereConfigis the merged layer stack output, andconfigured_mcp_servers/effective_mcp_serversconsume that catalog. So a[mcp_servers.codegraph]table in a project's.codex/config.tomlis honored, project-scoped.Verified on Codex CLI 0.147.0 (2026-08): an MCP server declared in
<project>/.codex/config.tomlshows up incodex mcp listinside that project and nowhere else.Suggested change
CodexTarget.supportsLocation('local')→ returntrue(optionally version-gated: only for Codex builds that ship the project layer, with a graceful fallback toglobalfor older ones).localinstall should write[mcp_servers.codegraph]to<project>/.codex/config.tomland the marker-fenced CodeGraph section to the project-rootAGENTS.md(mirroring the opencode target's local behavior — Codex already reads project-rootAGENTS.md).uninstall --location=localshould roll those back, anddetect(loc)should check<project>/.codex/config.tomlfor an existing[mcp_servers.codegraph]table.Why it matters
CodeGraph's whole install story is "wire up only the agents you use, per project when possible". Codex is currently the one agent that forces a global install, which leaks the MCP server into every Codex session on the machine — exactly what the
locallocation exists to avoid.