Sessionboxer

Codex 0.169 ignores a repository's own config in codex exec until you pass --trust. What stops loading, and how to grant trust on purpose

Codex CLI 0.169 skips a repository's .codex config and MCP servers in codex exec until the project is trusted. What changed and when to trust.

Sessionboxer's MCP servers settings with a github entry connected to a GitHub account, and the Add server, Import JSON, Add GitHub and Add Bitbucket buttons

You run Codex from a script. Maybe a CI job calls codex exec on every pull request, or a cron job asks it to tidy a repository each night. The repository has a .codex/config.toml with an MCP server the job needs. After an update, the server is gone and the agent works without it. The run does not fail. It just has fewer tools.

That is the change in Codex CLI 0.169.0, which OpenAI published on November 13, 2026. This post explains what stops loading, how to trust a project on purpose, and when you should leave it untrusted.

What changed in Codex 0.169.0

The release notes for rust-v0.169.0 say that codex exec keeps project configuration and MCP servers disabled in untrusted directories, even with --sandbox workspace-write. A new --trust flag on codex exec and codex review saves trust for the project.

Project configuration means the .codex/ folder inside the repository. OpenAI's advanced configuration docs say Codex loads project-scoped config files only when the project is trusted. For an untrusted project it ignores .codex/config.toml, project-local hooks and project-local rules. Your own ~/.codex/config.toml and the system config still load.

The non-interactive mode docs say the same for scripts: local codex exec and codex review load project config and project-defined MCP servers only for trusted projects, even in a writable sandbox.

We checked it. We used a fresh CODEX_HOME, a git repository with one MCP server in .codex/config.toml, and the same command on both versions:

codex exec --sandbox workspace-write "say hi"

Codex 0.168.0 started with the project's MCP server (mcp_server_count=1 in its log). Codex 0.169.0 started with none, and printed this first:

warning: Untrusted project-local configuration is disabled. Run `codex exec --trust` to allow project configuration and MCP servers for this and future chats in the project, including MCP commands outside the sandbox. Explicitly untrusted projects must have their trust setting updated first.

The warning goes to stderr. If your job only keeps stdout, or nobody reads the logs, you will notice different results before you find the reason.

Why the default moved

A repository's .codex/ folder is configuration that someone else wrote. An MCP server entry is a command to start. Hooks run commands. Rules change what the agent may do. When you clone a repository and run an agent in it, those settings come with the clone.

The help text for --trust says that trust covers "MCP commands outside the sandbox". So the --sandbox flag you pass does not contain a project-defined MCP server. A writable sandbox was never a good reason to start a stranger's MCP command, and 0.169.0 stops treating it as one.

We wrote about this kind of problem twice this month. The agentaudit post covers a tool that lists what a repository's .claude, .cursor and .codex folders set up before you open it. The Codex GitHub Action post shows how far an agent in CI can reach from a single issue.

How to trust a project on purpose

If the repository is yours and you want its config, add --trust once:

codex exec --trust --sandbox workspace-write "run the test suite and fix what fails"

Codex then writes the decision into your user config. In our test it added this to $CODEX_HOME/config.toml:

[projects."/home/ubuntu/codextest/proj"]
trust_level = "trusted"

trust_level is documented in the configuration reference with two values, trusted and untrusted. You can write the entry yourself instead of passing the flag. A line in a config file is easier to review than a flag buried in a script, and it fits a CI image where the config file is part of the build.

The release notes and the CLI help add some rules:

Situation What --trust does
Project has no saved decision Saves trusted for this and future runs
Project is marked untrusted Refuses. Change the setting first
Run with --ephemeral Still saves the trust decision
Run with --ignore-user-config Refuses to start, because saved trust must be checked

Watch the --ephemeral row. That flag means "do not keep session files", and the trust grant is kept anyway. If you reuse a runner and expect nothing to persist between jobs, the user config in CODEX_HOME is one more thing that does.

When to leave it untrusted

Do not add --trust to every script just to silence the warning. Ask where the checkout comes from.

A job that runs on your own main branch, in a repository only your team writes to, can trust it. The .codex/ folder there went through the same review as the code.

A job that runs on pull requests from forks, on issues, or on repositories you clone to look at should stay untrusted. Anyone who can change .codex/config.toml in that checkout can choose the commands Codex starts. If the job needs an MCP server, define it in the runner's user config, where the repository cannot change it.

To block a repository for good, mark it untrusted. Then --trust refuses to override it:

[projects."/srv/checkouts/third-party"]
trust_level = "untrusted"

After you upgrade, look for jobs that depended on project config without saying so. A model setting in .codex/config.toml, a project hook or an MCP server the prompt expects will now be missing, and the warning above is the only sign.

Where Sessionboxer fits

Sessionboxer runs Codex in its own container for each session (see one box per session). It does not call codex exec. It starts Codex through Codex's ACP adapter. The Sandbox image ships its own ~/.codex/config.toml with approval_policy = "never" and sandbox_mode = "danger-full-access". The comment in that file gives the reason: the container is the isolation, so Codex runs without approvals and without its own sandbox.

MCP servers are set up outside the repository. You register them once in Global settings and switch them on per session, as the MCP servers chapter of the guide describes. Command servers run inside the box. Values marked secret are stored write-only and never end up in snapshots. The MCP servers feature page has the details.

Sessionboxer does not tell you whether a repository's .codex/ folder is safe. Reading it, or running a tool like agentaudit, is still your job. If your codex exec line lives in cron, Automations can run a prompt on a cron schedule in an existing session or a new one instead.

For the container side of running Codex yourself, see Run Codex CLI in Docker.

A short checklist

  1. After upgrading, search your job logs for "Untrusted project-local configuration is disabled".
  2. For repositories you own, add a trust_level = "trusted" entry or pass --trust once.
  3. For forks, issues and third-party code, stay untrusted and move the MCP servers you need to user config.
  4. Mark repositories you never want to trust as untrusted.
  5. Remember that --ephemeral does not undo a trust grant.

Features mentioned

Keep reading