Tool pages / Codex CLI
OpenAI Codex CLI 0.162.1: latest version, removed flags and gotchas
Latest: Codex CLI 0.162.1, released (release notes).
The latest OpenAI Codex CLI (codex, npm @openai/codex) is 0.162.1, released 2026-10-09 19:44 UTC. Upgrade with npm i -g @openai/codex@latest, codex update or Homebrew. Our sandbox diff against 0.160.1 adds codex sandbox uninstall, --cyber-access-program on exec, fork, resume and review, and --no-daemon on remote-control. The removals agents still trip on are older: codex exec --full-auto (gone in 0.147.0) and codex mcp-server (gone in 0.154.0).
How do I install or upgrade to Codex CLI 0.162.1?
npm:
npm i -g @openai/codex@latest
codex --version # codex-cli 0.162.1Built-in updater:
codex updateHomebrew:
brew upgrade --cask codexStandalone installer (macOS, Linux):
curl -fsSL https://chatgpt.com/codex/install.sh | shPin a version (for example the last one with `codex mcp-server`):
npm i -g @openai/codex@0.153.4Codex CLI key facts
- Latest release: 0.162.1 on 2026-10-09 19:44 UTC (GitHub tag
rust-v0.162.1; npm publish 19:50 UTC). Previous stable releases: 0.162.0 on 2026-10-08 and 0.161.0 on 2026-10-07. - 0.160.1 to 0.162.1 adds
codex sandbox uninstall,--cyber-access-programacrossexecsubcommands, and--no-daemontoremote-controlin our sandbox capture (73 help pages for 0.162.1). codex exec --full-autowas deprecated in 0.128.0 and removed in 0.147.0 (2026-08-07); use--sandbox workspace-write.codex mcp-serverwas removed in 0.154.0 (2026-09-09); 0.153.4 is the last version that has it.- OpenAI shipped 19 stable Codex CLI releases (
rust-vtags) in September 2026 and 5 in October 2026 to date. - Apache-2.0 licence; 128,486 GitHub stars on 2026-10-10.
What changed in the last 5 Codex CLI releases?
Codex CLI 0.162.1 (2026-10-09 19:44 UTC)
Codex CLI 0.162.0 (2026-10-08 18:55 UTC)
- Add managed Git worktree tools in the TUI when the worktrees feature is enabled for a trusted project. (source)
- Pin tasks in the agent Command Center with
p; navigate and copy transcript blocks with/copyorCtrl+Insert; tune mouse scrolling withtui.mouse_scroll_speed. (source) - Make URLs clickable across approval headers, questions, MCP prompts, and warnings even when links wrap. (source)
- Reject sandbox-writable bubblewrap executables from PATH during Linux sandbox construction. (source)
Codex CLI 0.161.0 (2026-10-07 15:58 UTC)
- Add per-turn Cyber access program selection with
codex exec --cyber-access-program(standard,daybreak_blue,daybreak_red). (source) - Gate Daybreak controls and selection behind opt-in
features.cli_daybreak(--enable cli_daybreak). (source) - Support signing in to MCP servers from an active terminal session with
/mcp login <name>. (source) - Audio input channel selection and local microphone preferences for voice conversations. (source)
Codex CLI 0.160.1 (2026-10-05 18:29 UTC)
- Remote stdio MCP servers keep
SYSTEMROOT,TEMPandTMPwhen launched with explicitly configured remote environment variables (Windows executor fix). (source)
Codex CLI 0.160.0 (2026-10-01 20:19 UTC)
- Start sessions outside a project with workspace defaults when policy permits; saved permissions are restored on resume. (source)
- Opt-in Guardian review can retrieve earlier user instructions and include context from agent handoffs. (source)
- Explicit provider model catalogs no longer include unsupported bundled models. (source)
- SQLite stalls during connection setup fixed; initialization errors are surfaced instead of reported as timeouts. (source)
Which Codex CLI commands and flags were added or removed?
Codex CLI 0.160.1 → 0.162.1
1 commands added, 0 removed, 5 commands with flags added or removed; 6 help pages changed in any way.
Method: bin/tool-snapshot ran --help for every codex subcommand of both versions in a throwaway Linux sandbox (72 and 73 help pages), then bin/tool-diff compared them. Hidden flags do not appear in --help.
Commands added:
codex sandbox uninstall
| Command | Flags added | Flags removed |
|---|---|---|
codex exec | --cyber-access-program | none |
codex exec fork | --cyber-access-program | none |
codex exec resume | --cyber-access-program | none |
codex exec review | --cyber-access-program | none |
codex remote-control | --no-daemon | none |
codex sandbox uninstallwas added to clean up legacy Windows sandbox accounts and network rules (fails on Linux);--cyber-access-programallows per-turn selection of Cyber programs acrosscodex execsubcommands;codex remote-controlgains--no-daemon.
Codex CLI 0.153.4 → 0.154.0
0 commands added, 1 removed, 13 commands with flags added or removed; 13 help pages changed in any way.
Method: bin/tool-snapshot ran --help for every codex subcommand of both versions in a throwaway Linux sandbox (72 and 71 help pages), then bin/tool-diff compared them. Hidden flags do not appear in --help.
Commands removed:
codex mcp-server
| Command | Flags added | Flags removed |
|---|---|---|
codex | --worktree | none |
codex archive | --worktree | none |
codex delete | --worktree | none |
codex exec | --worktree | none |
codex exec fork | --worktree | none |
codex exec resume | --worktree | none |
codex exec review | --worktree | none |
codex exec-server | --aws-profile--aws-region--aws-service--aws-sigv4--remote-transport | none |
codex exec-server forward | --aws-profile--aws-region--aws-service--aws-sigv4--remote-transport | none |
codex fork | --worktree | none |
codex queue | --worktree | none |
codex resume | --worktree | none |
codex unarchive | --worktree | none |
codex mcp-serverdisappears from the top-level command list;--worktreearrives on 12 commands.
Codex CLI 0.146.1 → 0.147.0
0 commands added, 0 removed, 8 commands with flags added or removed; 31 help pages changed in any way.
Method: bin/tool-snapshot ran --help for every codex subcommand of both versions in a throwaway Linux sandbox (67 and 67 help pages), then bin/tool-diff compared them. Hidden flags do not appear in --help.
| Command | Flags added | Flags removed |
|---|---|---|
codex | --approve-for-me | none |
codex archive | --approve-for-me | none |
codex delete | --approve-for-me | none |
codex exec | --approve-for-me | none |
codex exec-server | --concurrent-requests--exit-on-stdin-close | none |
codex fork | --approve-for-me | none |
codex resume | --approve-for-me | none |
codex unarchive | --approve-for-me | none |
- The removal of
codex exec --full-autodoes not show here: the flag was hidden from--helpbefore it was removed. See the gotcha below for the error it now produces.
What breaks when upgrading Codex CLI, and how do I migrate?
| Version | Change | Migration |
|---|---|---|
| 0.161.0 | Daybreak controls and automatic routing are gated behind an opt-in feature (features.cli_daybreak), disabled by default; daybreak=true alone no longer enables it. | Pass --enable cli_daybreak on the command line or set features.cli_daybreak = true in ~/.codex/config.toml. |
| 0.159.0 | Removed automatic follow-up prompt suggestions and the tui.prompt_suggestions setting; removed the bundled plugin-creator skill. | Delete tui.prompt_suggestions from ~/.codex/config.toml; install the plugin-creator skill separately if you used it. |
| 0.154.0 | The deprecated codex mcp-server entry point (Codex as a stdio MCP server) and the codex-mcp-server crate were removed. | No replacement is named in the release notes or PR #42993. Pin @openai/codex@0.153.4 if an MCP client still launches codex mcp-server. |
| 0.147.0 | Removed the hidden, deprecated codex exec --full-auto flag and its implicit mapping to the workspace-write sandbox. | codex exec --full-auto → codex exec --sandbox workspace-write. 0.147.0 also added --approve-for-me (automatic review of approval requests). Fix page |
| 0.140.0 | Removed the experimental /realtime voice controls from the TUI. | Voice came back as /voice (experimental in 0.155.0, on by default with an F8 toggle in 0.156.0). |
What Codex CLI errors did we reproduce, and how do I fix them?
Fix pages (one error each, with a reproduction): error: unexpected argument '--full-auto' found, Not inside a trusted directory and --skip-git-repo-check was not specified., Error: `codex sandbox uninstall` is only supported on Windows.
`codex exec --full-auto` fails with unexpected argument (Codex CLI 0.162.1)
codex exec --full-auto "say hi"error: unexpected argument '--full-auto' found
tip: to pass '--full-auto' as a value, use '-- --full-auto'
Usage: codex exec [OPTIONS] [PROMPT]
codex exec [OPTIONS] <COMMAND> [ARGS]
For more information, try '--help'.Fix: Use codex exec --sandbox workspace-write "...". The flag was hidden from --help, so a help diff cannot show its removal; only running it does. (source)
Fix page: /fixes/codex-exec-full-auto-removed
`codex mcp-server` no longer starts an MCP server (Codex CLI 0.162.1)
codex mcp-server </dev/nullError: stdin is not a terminalFix: The subcommand was removed in 0.154.0; with no subcommand of that name, our run ended in the interactive UI's terminal check instead of an unknown-command error. Pin @openai/codex@0.153.4 for MCP clients that still spawn codex mcp-server. (source)
`codex sandbox uninstall` fails on Linux (Codex CLI 0.162.1)
codex sandbox uninstall </dev/nullError: `codex sandbox uninstall` is only supported on WindowsFix: codex sandbox uninstall was added in 0.162.0 to clean up legacy Windows sandbox accounts and network rules when run as administrator. On Linux and macOS, Codex uses bubblewrap and sandbox uninstallation is unsupported. (source)
`codex exec review --cyber-access-program` is unsupported (Codex CLI 0.162.1)
codex exec review --cyber-access-program standard </dev/nullError: --cyber-access-program is not supported with `codex exec review`Fix: Omit --cyber-access-program when running codex exec review. Cyber access programs can only be selected for new, resumed, or prompted fork execution turns, not review turns. (source)
`codex exec` refuses to run outside a Git repository (Codex CLI 0.162.1)
cd /tmp && codex exec --sandbox workspace-write "say hi"Reading additional input from stdin...
Not inside a trusted directory and --skip-git-repo-check was not specified.Fix: Run inside a Git repository or a trusted directory, or add --skip-git-repo-check. Reading additional input from stdin... appears whenever stdin is not a terminal; pass </dev/null in scripts. (source)
Linux sandbox warns that bubblewrap is missing (Codex CLI 0.162.1)
codex exec --skip-git-repo-check --sandbox workspace-write "say hi" # Debian 13 containerwarning: Codex could not find bubblewrap on PATH. Install bubblewrap with your OS package manager. See the sandbox prerequisites: https://developers.openai.com/codex/concepts/sandboxing#prerequisites. Codex will use the bundled bubblewrap in the meantime.Fix: apt-get install bubblewrap (or your distribution's package) before running Codex on Linux; the bundled copy is a fallback. 0.162.0 added filtering to reject writable bubblewrap executables from PATH. (source)
Codex CLI release history by month
2026-10: 0.160.0 to 0.162.1 (5 releases to 2026-10-10)
- 0.162.0 added managed Git worktree tools in the TUI; 0.162.1 fixed multiline async questions and daemon compatibility. (source)
- 0.161.0 added
codex exec --cyber-access-programand gated Daybreak behindfeatures.cli_daybreak. (source) - 0.160.0: projectless sessions with workspace defaults; Guardian review context. (source)
2026-09: 0.152.0 to 0.159.3 (19 releases)
- 0.154.0 (2026-09-09) removed
codex mcp-serverand added experimental--worktreesessions. (source) - 0.157.0 added GPT-6 Sol and Luna; 0.159.1 made GPT-6.1 Sol the bundled default. (source)
- 0.156.0 added
/tuifullscreen UI, voice by default and--no-daemon; 0.159.0 removedtui.prompt_suggestions. (source)
2026-08: 0.146.1 to 0.151.0 (8 releases)
2026-07: 0.142.5 to 0.146.0 (11 releases)
2026-06: 0.136.0 to 0.142.4 (11 releases)
- 0.136.0 added
codex archiveandcodex unarchive; 0.140.0 addedcodex deleteand removed/realtime. (source)
2026-05: 0.129.0 to 0.135.0 (7 releases)
- 0.129.0 added Vim editing in the composer; 0.132.0 let
codex exec resumetake--output-schema. (source)
Sources
- openai/codex releases (GitHub API) (read 2026-10-10)
- @openai/codex on the npm registry (read 2026-10-10)
- Codex CLI 0.162.1 release notes (read 2026-10-10)
- Codex CLI 0.162.0 release notes (read 2026-10-10)
- Codex CLI 0.161.0 release notes (read 2026-10-10)
- Codex CLI 0.160.1 release notes (read 2026-10-10)
- Codex CLI 0.160.0 release notes (read 2026-10-10)
- Codex CLI 0.154.0 release notes (read 2026-10-10)
- Codex CLI 0.147.0 release notes (read 2026-10-10)
- Codex CLI 0.128.0 release notes (`--full-auto` deprecated) (read 2026-10-10)
- PR #52648: limit daemon feature compatibility checks to explicit CLI overrides (read 2026-10-10)
- PR #51866: preserve line breaks and links in multiline async questions (read 2026-10-10)
- PR #51211: reject sandbox-writable bubblewrap executables from PATH (read 2026-10-10)
- PR #50437: add a CLI command to uninstall the legacy Windows sandbox (read 2026-10-10)
- PR #51207: gate CLI Daybreak controls and selection behind an opt-in feature (read 2026-10-10)
- PR #50148: add managed worktree tools to the TUI (read 2026-10-10)
- PR #49939: add per-turn Cyber access program selection to exec and the SDK (read 2026-10-10)
- PR #42993: remove the deprecated codex mcp-server command (read 2026-10-10)
- PR #36054: remove legacy --full-auto handling from codex exec (read 2026-10-10)
- Codex README at rust-v0.162.1 (install methods) (read 2026-10-10)
- openai/codex repository (stars, licence) (read 2026-10-10)
Last verified: 2026-10-10.