Codex articles
Configuring and using OpenAI's Codex CLI, VS Code extension and cloud agent
-
Codex CLI v0.164 adds /presets and inline /permissions arguments for permission profiles
v0.164.0 stores reusable prompts in ten /presets slots and lets /permissions pick a permission profile as an argument. Plus credential masking and hardened sandbox checks.
-
Codex CLI v0.163 turns Daybreak back on by default and makes /config searchable
v0.163.0 enables Daybreak by default for eligible accounts, adds search across /config, lets you steer a response mid-turn, and checks proxy permission before a DNS lookup.
-
Codex config.toml: set the model, model_reasoning_effort (low to ultra) and per-task profiles
Change model and reasoning effort in ~/.codex/config.toml (model_reasoning_effort = "high"), switch per-task profiles with --profile, and see which layer wins when settings overlap
-
How to change reasoning effort in Codex CLI: model_reasoning_effort values and one-off overrides
How to change effort in Codex CLI: the model_reasoning_effort values (low, medium, high, xhigh, max, ultra) and how to set them in config.toml, with -c, or with /model.
-
Hand GitHub work to Codex Cloud, and what changed about building an environment
Using Codex Cloud from ChatGPT: creating an environment from Work in > Cloud, the install script and start skill Codex writes for you, sending tasks, and reviewing the result.
-
Set up Codex CLI and write an AGENTS.md that Codex actually reads
Install Codex CLI, sign in with a ChatGPT account or an API key, run a first task, and write an AGENTS.md — where it goes, the discovery order, the 32 KiB limit, and a template.
-
The Codex IDE extension in VS Code, and what the docs actually specify
Install the Codex extension in VS Code, Cursor or Windsurf, open the sidebar, choose between local work and delegating to Codex web, and see which panel behaviors are documented.
-
Notify when Codex finishes: notify = ["python3", "notify.py"] in config.toml
Set notify = ["python3", "/path/notify.py"] in config.toml and Codex runs it after every turn with one JSON argument. Covers the JSON fields and tui.notifications filtering.
-
Codex CLI v0.161 and v0.162 changes, and GPT-6.1 Sol becoming the default model
In v0.161.0 the default model becomes GPT-6.1 Sol and Daybreak needs an explicit cli_daybreak opt-in. Plus v0.162.0's managed worktree tools and the sandbox fixes.
-
Codex reads only 32 KiB of AGENTS.md by default: project_doc_max_bytes explained
project_doc_max_bytes defaults to 32768 bytes, and once that total is reached Codex adds no further AGENTS.md files. How the cap applies, and how to raise it.
-
Codex CLI v0.160 and how to configure automatic review (Guardian)
The four new features in Codex CLI v0.160.0, and how the opt-in Guardian review is configured through auto_review.policy and the managed guardian_policy_config.
-
What does Codex --full-auto actually do? Approvals and sandbox explained
--full-auto is shorthand for on-request approvals plus a workspace-write sandbox, and it is now deprecated. What runs unattended, what stays blocked, and what to use instead.
-
Codex CLI v0.158: MCP OAuth client secrets and approval for elevated commands
What changed in Codex CLI v0.158.0: MCP servers that need pre-registered OAuth client secrets, terminal approval on by default for elevated commands, and the sandbox fixes.
-
Codex vs Claude Code: OS sandbox or per-tool allow/deny, config.toml or settings.json
Codex gates work with an OS-level sandbox and approval policy; Claude Code with per-tool allow/deny rules. Plus config.toml vs settings.json, AGENTS.md vs CLAUDE.md, and pricing.
-
hide_agent_reasoning = true hides Codex reasoning output; show_raw_agent_reasoning = true shows it
hide_agent_reasoning = true suppresses reasoning, show_raw_agent_reasoning = true shows raw reasoning, model_reasoning_summary (auto to none) sets length. Depth is a separate key.
-
Stop Codex asking "trust this folder?": set trust_level = "trusted" in config.toml
Add [projects."<absolute path>"] with trust_level = "trusted" to ~/.codex/config.toml to stop the prompt. Untrusted projects have .codex/config.toml, hooks and rules ignored.
-
Codex passes your API keys to commands by default: fix it with shell_environment_policy
ignore_default_excludes defaults to true, so variables containing KEY, SECRET or TOKEN are passed straight through. How to set it to false, plus inherit, filters and set.
-
Codex approval_policy vs sandbox_mode: which pairs are safe (on-request + workspace-write, never + read-only)
What approval_policy and sandbox_mode each control in Codex CLI, what --full-auto really sets, and which combination to pin in config.toml for research, daily work and CI.
-
enabled_tools and disabled_tools: expose only some MCP tools to Codex (timeouts default to 10 s and 60 s)
In [mcp_servers.<id>] use enabled_tools to allow only listed tools, disabled_tools to block, startup_timeout_sec (default 10), tool_timeout_sec (default 60) and the approval mode.
-
file_opener = "cursor": make file references in Codex output open in Cursor, VS Code or Windsurf
One line in ~/.codex/config.toml turns cited paths into clickable editor links. Values: vscode (default), vscode-insiders, windsurf, cursor, none. Needs OSC 8 hyperlink support.
-
history.persistence = "none" stops Codex writing chat history; keyring keeps credentials off disk
Two lines in ~/.codex/config.toml: history.persistence = "none" (default save-all) and cli_auth_credentials_store = "keyring" or "ephemeral". What each disables and the trade-offs.
-
web_search = "disabled" | "cached" | "indexed" | "live": what each Codex search mode allows
Codex defaults to cached search locally and live with full access. web_search = "indexed" cuts prompt injection risk, "disabled" turns it off, and --search enables it for one run.
-
writable_roots = ["/path"]: let Codex write outside the workspace (cwd, /tmp, $TMPDIR are writable by default)
In [sandbox_workspace_write] add writable_roots for caches such as ~/.pyenv/shims, set exclude_slash_tmp or exclude_tmpdir_env_var to block temp dirs, and why .git stays read-only.
-
Add an MCP server to Codex CLI: the [mcp_servers] block in config.toml
Connecting MCP servers to Codex CLI: the [mcp_servers.<name>] block in config.toml, passing tokens through environment variables, and debugging a server that will not connect.