Workspace-level config.toml

Resolved 💬 12 comments Opened Aug 21, 2025 by MaxKless Closed Jan 26, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What feature would you like to see?

I want to be able to specify not just a global config.toml but also one specific to my workspace.
For example, I can have the linear MCP installed globally but other MCP servers that only make sense in a specific workspace should only be specified there.

Right now it's possible to change the config.toml that codex uses via an env var or cli arg but I think it's important to be able to specify it at the workspace level. This will allow the configs to be merged together (or overwritten) instead of having to duplicate everything at both levels (workspace and global).

This is a core use-case that all the other major agents / agent CLI tools support except for codex.

Thanks!

Are you interested in implementing this feature?

_No response_

Additional information

_No response_

View original on GitHub ↗

12 Comments

Ronmi · 11 months ago

I've found a workaround that might be useful if you have jq installed and a valid (and simple) .mcp.json

alias c='codex -c "mcp_servers=$(jq .mcpServers \"path/to/.mcp.json\" -cM | sed '\''s/\":/\"=/g'\'')"'

WARNING: This command might fail as the sed expression does not cover all possible cases for the mcp_servers format.

MaxKless · 10 months ago

Any feedback on this request? I'd also be happy to help contribute here if that will help move this forward

alanwilhelm · 10 months ago

How is this not already working?

I can't keep a unique config for a project?

MaxKless · 10 months ago

Nope, you can only override the config location with an env var whenever you start codex but you can't keep separate configs and merge them.

jpcaparas · 10 months ago
etraut-openai contributor · 8 months ago

Here is a PR by @ChrisLinn that provides a good proof of concept for this feature.

MaxKless · 8 months ago

glad to see this gaining traction!! Looking forward to the official implementation :)

LaelLuo contributor · 8 months ago

I submitted PR #3864 implementing workspace-level config.toml\! It added --project flag support and config merging. Unfortunately closed due to new feature policy. You're absolutely right - config merging (workspace + global) would be much cleaner than duplicating everything. Hope this gets prioritized someday\! 💪

etraut-openai contributor · 5 months ago

This should now work if you're using the Codex CLI. You can define a project-local .codex/config.toml file and specify project-specific settings like MCP servers. One caveat: project-local config.toml files are ignored if the project is not trusted.

We're still working on plumbing this feature through for the Codex IDE Extension. I'll keep this thread open until that's complete.

etraut-openai contributor · 5 months ago

This will be included in the next release of the IDE Extension! As I mentioned above, it has been implemented in the CLI for the past few releases.

MaxKless · 5 months ago

I love to see it, thanks @etraut-openai !

dyanakiev · 4 months ago

Is this implemented for codex vs code extension?