Not able to override config.toml while invoking codex
Resolved 💬 3 comments Opened Feb 28, 2026 by amit-mittal Closed Mar 2, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of Codex CLI is running?
v0.106
What subscription do you have?
Enterprise
Which model were you using?
gpt-5.3
What platform is your computer?
MacOS
What terminal emulator and version are you using (if applicable)?
iTerm2
What issue are you seeing?
MCP section present in your repo's config.toml is not overridable through codex --config unless that MCP server is also present in your ~/.codex/config.toml.
What steps can reproduce the bug?
- In your repo's
config.toml
[mcp_servers.sentry]
url = "https://mcp.sentry.dev/mcp"
enabled = false
- Invoke
codex --config mcp_servers.sentry.enaled=true - It fails with
Error loading config.toml: invalid transport in mcp_servers.sentry
If the same section is also in your ~/.codex/config.toml, the override works.
What is the expected behavior?
_No response_
Additional information
_No response_
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Thanks for the report.
Root cause: during project trust resolution, Codex was deserializing the pre-project merged config after applying
--configoverrides, but before loading repo-local.codex/config.tomllayers. For MCP overrides likemcp_servers.sentry.enabled=true, that produced a partial MCP server table and failed withinvalid transportbefore the repo-localurlcould merge in.I have this exact same issue today, has there been a regression here?
codex-cli 0.140.0