Workspace-level config.toml
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
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.
Any feedback on this request? I'd also be happy to help contribute here if that will help move this forward
How is this not already working?
I can't keep a unique config for a project?
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.
https://github.com/openai/codex/issues/2628#issuecomment-3301944076
Hopefully this helps.
Here is a PR by @ChrisLinn that provides a good proof of concept for this feature.
glad to see this gaining traction!! Looking forward to the official implementation :)
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! 💪