Published Codex config schema is stricter than tolerated real-world `~/.codex/config.toml` files (4 root-level fields)

Resolved 💬 2 comments Opened Apr 7, 2026 by iqdoctor Closed Apr 9, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

The published/editor-facing Codex config schema is currently stricter than at least some real ~/.codex/config.toml files that the installed CLI still tolerates.

This issue is about schema content / compatibility, not schema delivery.

What I validated

I validated a real ~/.codex/config.toml against the live published schema URL:

  • https://developers.openai.com/codex/config-schema.json

As of April 7, 2026, that endpoint is reachable from this host and returns HTTP 200 / application/json, so this is no longer about 403 or schema fetch failures.

I parsed the TOML and validated it directly against the published schema. The mismatch is now much narrower than I originally thought.

Exact incompatibility

The published schema rejects exactly these 4 top-level fields from the real config:

  • ask_for_approval = "never"
  • sandbox = "danger-full-access"
  • experimental_use_rmcp_client = true
  • top-level [env]

In my case the top-level [env] table only contains:

  • USE_OMX_EXPLORE_CMD = "1"

The validation failure is:

  • Additional properties are not allowed ('ask_for_approval', 'env', 'experimental_use_rmcp_client', 'sandbox' were unexpected)

What now validates correctly

Everything else I tested in this same real-world config now validates correctly, including:

  • approval_policy
  • sandbox_mode
  • experimental_compact_prompt_file
  • features.child_agents_md
  • mcp_servers.*
  • notice.*
  • plugins.*

So this no longer looks like a broad schema mismatch. It looks like a precise 4-field compatibility gap at the config root.

Important runtime data point

On the same host, the installed CLI still starts against this same ~/.codex/config.toml:

  • codex-cli 0.119.0-alpha.11
  • codex features list succeeds

So the current practical mismatch seems to be one of these:

  1. the published schema is stricter than a config format still tolerated by the CLI/runtime for compatibility reasons, or
  2. these 4 fields are legacy and the CLI still tolerates them, but the schema intentionally does not, in which case there needs to be an explicit migration path / compatibility note.

Request

Please clarify which of these is intended:

  1. these 4 root-level fields are still accepted for backward compatibility and should be represented in the schema as deprecated compatibility aliases, or
  2. these 4 root-level fields are no longer part of the supported config dialect and users should migrate away from them, with docs and/or CLI warnings pointing to the canonical replacements.

If the second is intended, it would help to document the canonical replacements explicitly for:

  • ask_for_approval -> approval_policy
  • sandbox -> sandbox_mode
  • experimental_use_rmcp_client -> current canonical feature/config path, if any
  • top-level [env] -> current canonical config location, if any

I can provide a minimized repro config if useful.

View original on GitHub ↗

2 Comments

ybratec · 4 months ago

Revalidated this today (April 7, 2026) against the live published schema URL:

  • https://developers.openai.com/codex/config-schema.json

The endpoint is now reachable from this host and returns HTTP 200 / application/json, so this is no longer about schema delivery.

I parsed the real config on disk (~/.codex/config.toml) as TOML and validated it directly against the live published schema. The compatibility gap is now narrower than my original report suggested:

The schema rejects exactly these 4 top-level fields:

  • ask_for_approval = "never"
  • sandbox = "danger-full-access"
  • experimental_use_rmcp_client = true
  • top-level [env] (in my case only USE_OMX_EXPLORE_CMD = "1")

Everything else I tested in this same real-world config now validates correctly, including:

  • approval_policy
  • sandbox_mode
  • experimental_compact_prompt_file
  • features.child_agents_md
  • mcp_servers.*
  • notice.*
  • plugins.*

One more relevant data point: on the same host, codex-cli 0.119.0-alpha.11 still starts against this same ~/.codex/config.toml (for example, codex features list succeeds).

So the issue still looks real, but more specifically it seems to be:

  1. the published/editor-facing schema is stricter than a real config currently tolerated by the installed CLI/runtime, or
  2. these 4 fields are legacy and need an official migration path / compatibility note.

Either way, the mismatch is now easy to state precisely: it is no longer a broad schema mismatch, but a 4-field compatibility gap at the config root.

etraut-openai contributor · 4 months ago

Yes, the published schema doesn't include some deprecated keys that are currently tolerated by the parser. That's fine. These deprecated keys should be flagged so users know that they should be removed.