After upgrading to Codex 0.159.3, it refuses to start because config.toml sets approval_policy = "untrusted" — why, and what replaces that setting?
answer
- a retired policy value
- the error names the fix
- trust moves to the project entry
- projects table in user config
- explicit policy beats derived
basics
~20 sCodex 0.159.3 no longer accepts approval_policy = "untrusted" and stops with an error until it is removed. Use read-only with on-request for cautious work, or mark the project trust_level = "untrusted" in ~/.codex/config.toml to keep command approvals strict.
solid answer
~40 sAt 0.159.3 the value is retired: loading it fails with `approval_policy = "untrusted" is no longer supported; remove this setting`, and the docs warn it can stop the client starting. Remove it everywhere it can hide: user config, project `.codex/config.toml`, profile files, startup scripts and managed defaults. For cautious interactive work, use `sandbox_mode = "read-only"` with `approval_policy = "on-request"`. To keep the old stricter behaviour for one repository, omit `approval_policy` and add `[projects."<path>"]` with `trust_level = "untrusted"` to user-level `~/.codex/config.toml`. Codex then derives the strict policy itself: commands need approval unless an execpolicy rule allows them, and project-scoped `.codex/` layers (config, hooks, rules) are skipped. An explicit `on-request` overrides that derived policy, and managed `allowed_approval_policies` must still include `untrusted` to permit it.
code
toml · 10 lines# ~/.codex/config.toml (user level)
# approval_policy = "untrusted" # retired: Codex 0.159.3 refuses to start
# Cautious default for everyday work; no explicit approval_policy
sandbox_mode = "read-only"
# Strict command approvals for one repository
[projects."/home/dev/src/vendor-fork"]
trust_level = "untrusted"go deeper
Recall that approval_policy = "untrusted" is retired and makes Codex 0.159.3 refuse to start until it is removed.
Explain the two replacements: read-only with on-request, or a project trust_level = "untrusted" that derives a strict policy, and how they differ.
Plan the migration: find the value in every file, keep explicit policies from overriding strict projects, and check managed allowed_approval_policies.
Decide which repositories the team treats as untrusted, who owns those entries in user config, and how upgrades are tested before they reach every laptop.
## What changed Codex, OpenAI's coding agent, decides when to stop and ask before acting through **`approval_policy`**. Its `untrusted` value used to give the strictest command-approval rule. By release 0.159.3 that value is **retired as a setting**. The configuration loader checks for it explicitly and fails with: > `approval_policy = "untrusted" is no longer supported; remove this setting` The documentation says the retired setting "can prevent either client from starting". The values still accepted are `on-request` (the default), `never` and a `granular` table; `on-failure` survives only as a deprecated alias of `on-request`. ## Where the old value hides Upgrades break on configuration nobody remembers writing. Check: - the user file `~/.codex/config.toml` (or the one under `CODEX_HOME`); - project files `.codex/config.toml` in repositories; - **profile files**, `$CODEX_HOME/<name>.config.toml`, selected with `--profile`; - startup scripts and aliases that pass the value with `-c approval_policy=...`; - **managed defaults** pushed by an administrator. ## The two replacements | Goal | Configuration | Behaviour | |---|---|---| | Cautious interactive use | `sandbox_mode = "read-only"` and `approval_policy = "on-request"` | commands the sandbox allows run without asking; nothing can be written | | The old strict rule for one project | omit `approval_policy`; add a project entry with `trust_level = "untrusted"` | commands need approval unless an execpolicy rule allows them | The documentation is precise about the first row: with `on-request`, commands allowed by the sandbox run **without** approval. It is not a like-for-like replacement for the old command-by-command prompting; the read-only sandbox is what keeps it cautious. ## How a project trust level works **`trust_level`** lives in the `projects` table of the **user-level** config, keyed by path, and takes `"trusted"` or `"untrusted"`. When a project is marked untrusted and no explicit `approval_policy` is set, Codex derives an internal policy of the same name. Its effects: 1. **Command approvals** — commands require approval unless an execution-policy rule allows them, the behaviour the retired setting used to give. 2. **No project layers** — Codex skips project-scoped `.codex/` layers: project-local config, hooks and rules. User and system config, including global hooks and rules, still load. 3. **No project instructions** — in the 0.159.3 source, AGENTS.md discovery returns early for an explicitly untrusted project, so its repository `AGENTS.md` files are not loaded either. ## Precedence traps - **Explicit wins.** Setting `approval_policy = "on-request"` anywhere it applies overrides the project-derived policy, so a leftover line in a profile silently undoes the strict rule. - **Managed allowlists.** If an administrator constrains `allowed_approval_policies`, it must include `untrusted` for the derived policy to be permitted. That entry does **not** allow anyone to set `approval_policy = "untrusted"` explicitly. - **Trust is not a sandbox.** The trust level changes approvals and which project files load; the sandbox mode still decides what commands can technically touch. ## A second refusal in the same upgrade The retired policy is not the only configuration 0.159.3 rejects. A legacy top-level `profile = "<name>"` key in `config.toml` fails with a message telling you to use `--profile <name>` with a `<name>.config.toml` file instead. Teams that kept a strict setup in a named profile often meet both errors at once: - move the profile's contents into `$CODEX_HOME/<name>.config.toml`; - select it per launch with `--profile <name>` (short `-p`); - check that the profile file does not set `approval_policy` explicitly if a project is meant to stay strict. Managed configuration deserves the same review, because a managed default that still names `untrusted` can stop Codex starting on every machine that receives it. ## A migration checklist - Search every config file and script for the retired value and delete it. - Decide per repository: cautious (`read-only` plus `on-request`) or strict (`trust_level = "untrusted"`). - Remove explicit `approval_policy` lines that would override a strict project. - Ask the administrator whether managed requirements list `untrusted` among allowed policies. - Start Codex and confirm with `/status` that the session runs with the settings you expect.
- Besides approvals, what changes for a Codex project marked `trust_level = "untrusted"`?Codex skips the project's `.codex/` layers: project-local config, hooks and execpolicy rules. User and system config, including global hooks and rules, still load. In the 0.159.3 source, the project's `AGENTS.md` files are not loaded either.
- What does `approval_policy = "on-failure"` mean in Codex 0.159.3?It is a deprecated alias that deserializes to `on-request`, so it no longer means asking only after a sandboxed command fails. Replace it with `on-request` to say what you mean.
- approval_policy = untrusted still works and only prints a deprecation warning
- on-request is the strict replacement and prompts before every command
- Marking a project untrusted changes approvals only; its .codex config and hooks still load
- An explicit on-request line keeps an untrusted project's stricter rule
- on-failure is a separate policy that asks only after a command fails
Assumes Codex 0.159.3, which rejects approval_policy = "untrusted" at load time and keeps an untrusted policy only as one derived from a project's trust_level.