Advanced Codex Usage
An advanced operations and extension guide for teams standardizing Codex usage.
Recently Updated Chapters
Use Codex exec for non-interactive scripts, CI checks, and structured automation.
Connect Codex to MCP servers with explicit tool, data, and trust boundaries.
Standardize Codex installation, updates, identity, and local developer setup.
Manage Codex sessions across start, resume, fork, compact, archive, delete, and handoff.
Choose GPT-6 Astra, GPT-5.6 Sol, Terra, Luna, and reasoning levels by task risk, cost, and latency.
September 12, 2026 release refresh
Updated for Codex CLI 0.154.0 (September 9). npm latest=0.154.0 and alpha=0.155.0-alpha.3.10 were checked on September 12, 2026 KST.
- Sessions: experimental
--worktreeand/worktreecreate isolated checkouts for new or forked sessions, with browse/resume support. Inline questions accept choices or free text while work continues. - Extensions and approvals: existing sessions refresh installed plugin tools, skills, and hooks. Failed MCP OAuth refreshes surface sign-in without replaying rejected calls. Resume/fork preserve permissions, and new user instructions invalidate stale automatic approvals.
- Compatibility:
codex mcp-serverand the standalonecodex-mcp-serverwere removed. External MCP connections throughcodex mcpremain supported. Evaluate migration to experimentalcodex app-server; the official documentation does not support production workloads on that command. - Editing:
/copypreserves formatting and supports status output; Vim gainsRreplace mode. Windows gains a shared background server and daemon management.
Sources: official changelog, npm dist-tags.
Previous verification snapshot (September 5, 2026)
Codex is useful as an individual coding agent, but its real leverage appears when teams standardize configuration, safety rules, automation, context, and review practices.
This handbook is for senior developers and engineering leads who already use Codex and want to make it reliable in shared repositories and team workflows.
Core View
Codex quality depends on the environment around it: repository instructions, permissions, context packs, verification commands, and review routines.
September 2026 Baseline
Checked against Codex CLI 0.153.4, npm dist-tags, official release notes, and current Codex docs
on 2026-09-05 KST. npm latest is 0.153.4 and npm alpha is 0.154.0-alpha.3.
-
GPT-6 Astra (released 2026-09-03):
gpt-6-astrais now Codex's top model. It requires CLI0.153.0or later and, from0.153.4, is the bundled default when no model is explicitly configured. It has a 1,050,000-token context window, 128K max output, API pricing of $10 input / $1 cached input / $50 output per 1M, and an April 30, 2026 knowledge cutoff. Teams that pinmodelinconfig.tomlare unaffected by the default change, so adopt it deliberately. -
Astra security classification: OpenAI classifies Astra as its first model to reach the Critical cybersecurity capability level under the Preparedness Framework. Narrow
/permissions, sandboxing, and auto-approval scope before granting it broad automation. -
CLI 0.153.0–0.153.4: Vim undo/redo, remote marketplace management from the plugin CLI,
tui.auto_recap = false, TUI history showing complete patches and individual completed commands, and earlier allowance warnings for Plus and Team. Guardian review history now survives compaction, restarts, and forks, and Full Access skips Guardian reviews for confirmation-only actions.tui.disable_paste_burstand the disabled-by-defaultfeatures.context_management.experimental_modealso land here. -
CLI 0.152.0: the planning tool is disabled by default (enable with
tools.update_plan.enabled = true). MCP server names accept:,@,/, and.; individual MCP tools acceptoutput_token_limit; app-server clients can setthread/shellCommandtimeouts beyond one hour; and rate-limit banners gain usage, credit, and plan actions. -
CLI 0.151.0: a configurable discovery grace period for optional MCP servers, extensions that can inspect or replace MCP tool results before the model sees them, per-repository plugin catalog configuration, and nested subagent tokens counted toward root goal budgets.
-
CLI 0.150.0–0.150.1: task mentions and agent task messaging, the
/copypicker, automatic task titles and/renamesuggestions, clickable Markdown links,Interrupthooks, untrusted-project instruction isolation, persistent managed deny-read policy, image-aware remote compaction, and reliability fixes. -
CLI 0.149.0: the
codex agentsdashboard,codex queue,/cd//pwd//cwd, broadercodex doctordiagnostics, and permission-profile restoration across resume and fork. -
MCP transition:
codex mcp-serveris deprecated as of August 24; new integrations should usecodex app-serverwhile existing callers migrate. -
CLI 0.148.0:
/exportwrites a complete TUI conversation to Markdown,codex exec forkforks non-interactively, the resume picker archives/restores sessions, startup accepts draft prompts, and eligible workspaces see estimated credits/cost. It also adds a built-in Amazon Bedrock Runtime provider, async and MCP hook invocation, and broad resume, OAuth, rendering, and fail-closed sandbox fixes. -
CLI 0.147.0: portable Agent Plugins and catalog search, manually ordered transcript sections,
--approve-for-me, Cursor-skill import and conversation sync, and opt-in MCP 2026-07-28 support. Deprecatedcodex exec --full-autois removed; use--sandbox workspace-write. -
Model baseline: GPT-6 Astra is the top model; within GPT-5.6 use Sol for the hardest work, Terra for everyday engineering, and Luna for explicit repeated work. GPT-5.4 and GPT-5.4 mini retired from ChatGPT-sign-in Codex on 2026-08-31.
-
CLI 0.146.0: named
/newand/clearthreads, pinning and side-conversation switching, paginated-history forks, Agent Plugin manifests/workspace publishing, additional Bedrock and Claude Code marketplaces, remote Code Mode hosts, custom-provider web search, executor-provided skills, broader proxy handling, and live MCP/App tool refresh. -
CLI 0.145.0: experimental paginated thread history with names, search, memories, and subagent support; broader Cursor/Claude Code
/import; Bedrock login; audio; stabilized Multi-agent V2; and secure inline visualization links. -
CLI 0.143.0–0.144.0: remote plugins are enabled by default with npm marketplace sources and local/remote versions; system proxy support covers macOS and Windows PAC/WPAD;
codex remote-control pairgenerates manual pairing codes; MCP tool search is default and interactive/session auth is expanded; app approvals add awritesmode; reset credits show type/expiration and support explicit selection; Ultra warns about high multi-agent concurrency. The releases also harden retired-model compaction recovery, Windows writable-root deletion, terminal-control sanitization, and connector auth refresh.
Operating Model
Maturity Model
| Level | State | Common symptom | Promotion condition |
|---|---|---|---|
| L1 Personal | Each developer uses Codex differently | Results depend on individual habits | Shared setup and basic rules exist |
| L2 Standardized | Config and prompts are documented | Safety settings still drift | Approval and sandbox defaults are governed |
| L3 Automated | Repeatable tasks run through exec or agents | CI and review evidence are inconsistent | Verification output is required |
| L4 Governed | Team rollout is measurable | Changes in Codex behavior surprise teams | Changelog, models, and policies are reviewed |
Contents
Ch1. Setup and Login
Standardize installation, updates, identity, and shell integration.
Ch2. Config
Design profiles, defaults, and team policy layers.
Ch3. Memories
Manage persistent context without stale or unsafe facts.