Skip to content

Make confg.toml sharable across machines #5160

Closed

Description

@kosumic

What feature would you like to see?

Currently, my config.toml looks like this:

[projects."/tmp"]
trust_level = "trusted"

[projects."/tmp/spring-demo"]
trust_level = "trusted"

[projects."/tmp/kafka_test"]
trust_level = "trusted"

[tools]
web_search = true

Codex modifies it at runtime.

This is not ideal if my config.toml is managed by Git.

When I push my config.toml and other dotfiles to Github, I do not want to have those trust_level.

Additional information

No response

Activity

  1. added
    enhancement
    on Oct 14, 2025
  2. etraut-openai commented on Nov 15, 2025

    @etraut-openai
    Contributor

    The config.toml file is not stored within your project workspace, so if you're using the default sandbox policy, the model cannot modify it without your approval. We have received many requests for supporting a project-local config.toml, but this poses a security / sandboxing challenge.

  3. zeyugao commented on Nov 15, 2025

    @zeyugao

    @etraut-openai it is not related to the sandbox at all

    The codex itself will mark a workspace as trusted when we enter a new folder, it is what "Codex modifies it at runtime." means.

    What we want is to keep these trusted workspace in a new file such as ~/.codex/trusted.toml, so that trusting a new workspace will not affect the config.toml which is synced with git across different machines. As in different machine we will have different trusted workspaces.

  4. kosumic commented on Nov 17, 2025

    @kosumic
    Author

    Yes, this is what I meant.

    It should be trivial to separate them.

    Just ask codex to do it.

    @etraut-openai it is not related to the sandbox at all

    The codex itself will mark a workspace as trusted when we enter a new folder, it is what "Codex modifies it at runtime." means.

    What we want is to keep these trusted workspace in a new file such as ~/.codex/trusted.toml, so that trusting a new workspace will not affect the config.toml which is synced with git across different machines. As in different machine we will have different trusted workspaces.

  5. connorads commented on Jan 9, 2026

    @connorads

    +1 on this. I manage my ~/.codex/config.toml via dotfiles (synced across multiple machines) and the [projects] entries with absolute paths like /Users/myuser/git/project break portability.

    Separating trust to a separate file (e.g. trusted.toml) would solve this nicely.

    Alternatively, supporting tilde (~) or environment variable expansion ($HOME) in project paths would also help:

    [projects."~/git"]
    trust_level = "trusted"

    Either approach would make config.toml portable across machines.

  6. changed the title [-]Do not auto add trust_level to config.toml, put it in a separate file[/-] [+]Make confg.toml sharable across machines[/+] on Jan 14, 2026
  7. etraut-openai commented on Jan 30, 2026

    @etraut-openai
    Contributor

    Codex now supports project-local .codex/config.toml files.

  8. bohrshaw commented on Jan 31, 2026

    @bohrshaw

    This issue is actually about the trust_level setting. And it's never written to a project-local .codex/config.toml file.

  9. srstevenson commented on Feb 7, 2026

    @srstevenson

    codex-cli 0.98.0 still writes project trust_levels to ~/.codex/config.toml, and not a project local .codex/config.toml file or elsewhere, and ~/.codex/config.toml remains non-portable across machines.

  10. etraut-openai commented on Feb 7, 2026

    @etraut-openai
    Contributor

    @srstevenson, the ~/.codex/config.toml file isn't designed to be used across machines. We did recently add support for project-local config.toml overrides. Those are designed to be checked in to projects and used across machines.

  11. writeonlymemory commented on Feb 7, 2026

    @writeonlymemory

    @etraut-openai that's not helpful in the case of a single developer using multiple machines. I don't want every root I trust on my laptop trusted on my desktop, for example.

  12. srstevenson commented on Feb 7, 2026

    @srstevenson

    @etraut-openai Thanks for the clarification that ~/.codex/config.toml is currently intended to be machine-local.

    My motivation is that there are user‑level preferences that I want to apply consistently across all machines, without committing them in every repo. For example, I want Codex to use the same model everywhere, but I don't want to duplicate that config key across every repo on every machine, especially if other contributors don't use Codex (and even if they do, they may prefer a different model). That's why having machine-level state in a separate file from user‑level configuration would be helpful.

  13. etraut-openai commented on Feb 7, 2026

    @etraut-openai
    Contributor

    I think there's a real feature request buried in this thread, but the way it was phrased by the OP is problematic because it proposes a specific solution that we are unlikely to implement.

    Let's focus on the problem / need rather than a specific solution. I'd appreciate it if someone could open a new feature request that explains the use case and desired behavior.

  14. writeonlymemory commented on Feb 7, 2026

    @writeonlymemory

    @etraut-openai

    I think there are actually two feature requests:

    • I want host specific preferences
    • @srstevenson wants user preferences [I do, too, of course]

    The current behavior of putting both host [trusted roots] and user level [models, notices, etc] preferences in config.toml in the home directory precludes either of these things from working properly.

    I'll file a feature request if no one beats me to it.

  15. mattmorgis commented on Feb 8, 2026

    @mattmorgis

    @etraut-openai there is!

    I took a pass at requesting the user preferences (and how I'm currently working around it) here: #11061

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions