Skip to content

Workspace-level config.toml #2554

Closed
Closed

Description

@MaxKless

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

Activity

  1. added
    enhancement
    on Aug 21, 2025
  2. Ronmi commented on Aug 23, 2025

    @Ronmi

    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.

  3. MaxKless commented on Sep 16, 2025

    @MaxKless
    Author

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

  4. alanwilhelm commented on Sep 16, 2025

    @alanwilhelm

    How is this not already working?

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

  5. MaxKless commented on Sep 17, 2025

    @MaxKless
    Author

    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.

  6. jpcaparas commented on Sep 17, 2025

    @jpcaparas

    #2628 (comment)

    Hopefully this helps.

  7. etraut-openai commented on Oct 31, 2025

    @etraut-openai
    Contributor

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

  8. MaxKless commented on Nov 3, 2025

    @MaxKless
    Author

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

  9. LaelLuo commented on Nov 6, 2025

    @LaelLuo
    Contributor

    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! 💪

  10. marked Per-project config #3120 as a duplicate of this issue on Nov 9, 2025
  11. changed the title [-]Support workspace-level config.toml[/-] [+]Workspace-level config.toml[/+] on Nov 14, 2025
  12. added
    agent
    on Dec 14, 2025
  13. etraut-openai commented on Jan 24, 2026

    @etraut-openai
    Contributor

    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.

  14. etraut-openai commented on Jan 26, 2026

    @etraut-openai
    Contributor

    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.

  15. MaxKless commented on Jan 26, 2026

    @MaxKless
    Author

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

  16. dyanakiev commented on Mar 21, 2026

    @dyanakiev

    Is this implemented for codex vs code extension?

  17. added
    config
    and removed
    agent
    on Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    configenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions