Repositories can carry settings that change how a coding agent works. In Codex CLI, project trust determines whether a repository's project-scoped configuration is loaded.
An untrusted project cannot supply its own .codex/config.toml settings, project-local hooks, or project-local rules. User and system configuration still load, so an ignored repository setting can leave a personal default in effect.
Trust belongs to a particular repository path and is separate from sandbox and approval policies. Marking a project trusted allows its project layers to load; the resulting permissions still depend on the loaded configuration and organization requirements. Reading feature values needs neither a sign-in nor a model conversation.
An installed Codex CLI, a macOS or Linux shell, and a repository with project-local configuration are required. The Homebrew installation guide covers a supported installation method on both platforms. The trust entry normally lives in ~/.codex/config.toml; when CODEX_HOME is set, it lives in $CODEX_HOME/config.toml instead.
Steps to set project trust in Codex:
- Select your repository's root directory, replacing the path with its absolute path.
$ cd /home/user/example-app
The same absolute repository path belongs in the trust entry below. A trust entry for another checkout does not identify this directory.
- Review the repository's .codex/config.toml, project-local hooks, and rules.
A trusted project's configuration can influence Codex, including settings that affect command execution. Hooks can execute commands, and rules can affect approvals. Unreviewed configuration or hooks can cause unintended actions; trusting a broad parent directory can affect more projects than intended.
The .codex/config.toml path is relative to the selected repository. Project config can exist in subdirectories too; the closest loaded setting wins when Codex starts there.
- List the current effective feature values before changing the project settings. Example output:
$ codex features list ##### snipped ##### shell_snapshot stable true ##### snipped #####
The shell_snapshot feature reuses a shell-environment snapshot for command execution. Its current value supplies a comparison for the project override below. If it is already false, use true in the project file instead, then expect true in the final check. A command-line feature override would hide this comparison, so the listing uses no override flags.
Related: How to list Codex feature flags - Open the repository's .codex/config.toml in your text editor.
- Set shell_snapshot = false under [features] in the project .codex/config.toml file.
- .codex/config.toml
[features] shell_snapshot = false
If the [features] table already exists, change or add only its shell_snapshot key. Otherwise, add this table at the end of the file. Do not replace other project settings. This changes shell snapshot use without changing the sandbox or approval policy.
- Save the project .codex/config.toml file.
- Open your user-level ~/.codex/config.toml in your text editor.
If CODEX_HOME is set, open its config.toml instead. If the file does not exist, create it at that location. The trust decision belongs in this user-owned file, outside the repository it governs.
- Set the repository's trust_level to trusted, replacing the table's path with your repository's absolute path.
- ~/.codex/config.toml
[projects."/home/user/example-app"] trust_level = "trusted"
If this exact project table already exists, replace its trust_level value rather than creating a duplicate table. Otherwise, add the table at the end of the file. Do not replace unrelated user settings or other project entries. The supported values are trusted and untrusted. To revoke this decision later, trust_level = "untrusted" skips the project's configuration, hooks, and rules in new processes; user and system layers still load.
Project trust is not the retired approval_policy = "untrusted" setting. An explicit retired approval value can prevent startup; the approval-policy guide explains that separate migration.
- Save the user-level config.toml file.
- Confirm that a fresh feature listing from the same repository reports the project value. Example output:
$ codex features list ##### snipped ##### shell_snapshot stable false ##### snipped #####
Each invocation starts a new process and loads configuration again. With the false project setting above, the change from true to false shows that the project layer is active. If the row stays at its baseline value, or Codex reports a configuration error, the setting has not taken effect. A mismatched repository path, a different CODEX_HOME, or a more specific project config can explain the mismatch. Existing interactive sessions need a fresh session to load the saved trust decision.