Codex config.toml generator
Pick how much Codex may do, your model, notifications and MCP servers. Copy a ~/.codex/config.toml with only the keys you need, or paste yours to find settings Codex retired.
Runs in your browser. Nothing is sent anywhere.
1 · How much Codex may do
Sets approval_policy and sandbox_mode together.
2 · Model
Reasoning effort
Which levels work depends on the model.
Web search
Default is cached (OpenAI’s index, no live web), or live under full access.
3 · Tell me when Codex is done or waiting
Codex passes it one JSON argument when a turn completes. A sample script is in Claude Code and Codex notifications.
4 · MCP servers
Tools Codex can call. Each becomes an [mcp_servers.name] table.
5 · Trusted projects
Codex loads a project’s own .codex/ config, hooks and rules only when you trust it.
Your config.toml
# ~/.codex/config.toml approval_policy = "on-request" sandbox_mode = "workspace-write" [tui] notifications = true
Save it as ~/.codex/config.toml, or merge it into yours: keep lines you didn’t write, such as ones another tool added. Codex reads it when it starts.
With on-request, Codex waits for you
Every approval stops Codex until you notice it. Coral shows each waiting agent in your Mac’s notch and on your iPhone, with the command it wants to run, so you answer with one key. Get Coral for free
How to use it
- Pick an access level. “Edit the project, ask for the rest” is the usual one for working with Codex.
- Leave the model empty unless you want to pin one your plan offers; Codex uses its default otherwise.
- Add MCP servers and trusted project folders if you use them. To stop the approval prompt on every MCP tool call, see Codex MCP server approval modes.
- Copy the file to ~/.codex/config.toml, or merge it into the one you have, then start Codex again.
One-off changes don’t need the file: codex --sandbox workspace-write --ask-for-approval never or -c key=value overrides it for one run. For what each access level allows, see Codex sandbox and approval modes.
Questions
Where is the Codex config.toml file?
Your own settings live in ~/.codex/config.toml (or $CODEX_HOME/config.toml if you set CODEX_HOME). A project can add .codex/config.toml in its repo, which Codex loads only when you trust the project.
Which settings does a project’s .codex/config.toml ignore?
Provider, auth, notification, profile and telemetry keys: notify, profile, profiles, model_provider, model_providers, openai_base_url, chatgpt_base_url and otel, among others. Put those in ~/.codex/config.toml.
What should approval_policy be?
"on-request" when you work with Codex, "never" for scripts and codex exec. "untrusted" is retired and "on-failure" is deprecated. To keep a project at arm’s length, give it trust_level = "untrusted" under [projects."/path"] instead.
What’s the difference between sandbox_mode values?
read-only lets Codex read but not write. workspace-write lets it edit the project and run commands there, with network off unless you set network_access = true. danger-full-access removes the sandbox.
How do I add an MCP server to Codex?
Add a [mcp_servers.<name>] table: command and args for a local server, or url (plus bearer_token_env_var if it needs a token) for a remote one. Set enabled = false to switch one off without deleting it.
How do I get notified when Codex finishes?
Turn on notifications under [tui], which use your terminal’s own alerts, or set notify to a script. Codex runs it with one JSON argument whose type is agent-turn-complete.
Checked against OpenAI’s configuration reference and advanced configuration, November 2026.
Coral isn’t affiliated with OpenAI.