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?

  1. In your repo's config.toml
[mcp_servers.sentry]
url = "https://mcp.sentry.dev/mcp"
enabled = false
  1. Invoke codex --config mcp_servers.sentry.enaled=true
  2. 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_

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 6 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #13025
  • #13075

Powered by Codex Action

etraut-openai contributor · 6 months ago

Thanks for the report.

Root cause: during project trust resolution, Codex was deserializing the pre-project merged config after applying --config overrides, but before loading repo-local .codex/config.toml layers. For MCP overrides like mcp_servers.sentry.enabled=true, that produced a partial MCP server table and failed with invalid transport before the repo-local url could merge in.

nicolaschambrier · 2 months ago

I have this exact same issue today, has there been a regression here?

codex-cli 0.140.0