You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Reacted by Matt Ritter, Bohr Shaw, himkt, odlove, Ryo Iketani, Hirokazu Tanaka, 林玮 (Jade Lin), Jacob Hayes, Riccardo Mazzarini, Dmitri Vassilenko and 18 more
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.
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.
Reacted by Kosumi, Hirokazu Tanaka, David Marquez, Connor Adams, Xavier Chanthavong, Aaron Kemp, Chris Tonkinson, reloxx13, tummetott, Andreas Arvidsson and 1 more
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.
+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.
Reacted by Chris Tonkinson, Matthew DeGarmo, Hubert and Kerrick Staley
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
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.
@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.
@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.
Reacted by tummetott, Patrick Fu, Kerrick Staley and Filip Malinowski
@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.
Reacted by Aaron Kemp, Matt Morgis, tummetott, Patrick Fu, Kerrick Staley and Filip Malinowski
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.
@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.
Activity
etraut-openai commentedon Nov 15, 2025
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.zeyugao commentedon Nov 15, 2025
@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 theconfig.tomlwhich is synced with git across different machines. As in different machine we will have different trusted workspaces.kosumic commentedon Nov 17, 2025
Yes, this is what I meant.
It should be trivial to separate them.
Just ask codex to do it.
connorads commentedon Jan 9, 2026
+1 on this. I manage my
~/.codex/config.tomlvia dotfiles (synced across multiple machines) and the[projects]entries with absolute paths like/Users/myuser/git/projectbreak 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:Either approach would make config.toml portable across machines.
[-]Do not auto add trust_level to config.toml, put it in a separate file[/-][+]Make confg.toml sharable across machines[/+]etraut-openai commentedon Jan 30, 2026
Codex now supports project-local
.codex/config.tomlfiles.bohrshaw commentedon Jan 31, 2026
This issue is actually about the
trust_levelsetting. And it's never written to a project-local.codex/config.tomlfile.srstevenson commentedon Feb 7, 2026
codex-cli 0.98.0 still writes project
trust_levels to~/.codex/config.toml, and not a project local.codex/config.tomlfile or elsewhere, and~/.codex/config.tomlremains non-portable across machines.etraut-openai commentedon Feb 7, 2026
@srstevenson, the
~/.codex/config.tomlfile 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.writeonlymemory commentedon Feb 7, 2026
@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.
srstevenson commentedon Feb 7, 2026
@etraut-openai Thanks for the clarification that
~/.codex/config.tomlis 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.
etraut-openai commentedon Feb 7, 2026
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.
writeonlymemory commentedon Feb 7, 2026
@etraut-openai
I think there are actually two feature requests:
The current behavior of putting both host [trusted roots] and user level [models, notices, etc] preferences in
config.tomlin the home directory precludes either of these things from working properly.I'll file a feature request if no one beats me to it.
mattmorgis commentedon Feb 8, 2026
@etraut-openai there is!
I took a pass at requesting the user preferences (and how I'm currently working around it) here: #11061