{
  "tool": "codex",
  "name": "Codex CLI",
  "long_name": "OpenAI Codex CLI (codex)",
  "aliases": [
    "codex-cli",
    "openai-codex",
    "openai-codex-cli",
    "openai-codex-cli-rust"
  ],
  "homepage": "https://github.com/openai/codex",
  "url": "https://insidetheloop.dev/tools/codex",
  "markdown_url": "https://insidetheloop.dev/tools/codex.md",
  "date_modified": "2026-10-07T12:39:57Z",
  "title": "OpenAI Codex CLI 0.160.1: latest version, removed flags and gotchas",
  "description": "Codex CLI 0.160.1 (2026-10-05 UTC): upgrade commands, what changed, our --help diff, and the removed exec --full-auto and mcp-server with their exact errors.",
  "answer": "The latest OpenAI Codex CLI (`codex`, npm `@openai/codex`) is 0.160.1, released 2026-10-05 18:29 UTC. Upgrade with `npm i -g @openai/codex@latest`, `codex update` or Homebrew. Its command-line surface is identical to 0.159.3 in our sandbox diff. 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).",
  "latest": {
    "version": "0.160.1",
    "released_at": "2026-10-05T18:29:37Z",
    "url": "https://github.com/openai/codex/releases/tag/rust-v0.160.1"
  },
  "upgrade": [
    {
      "label": "npm",
      "command": "npm i -g @openai/codex@latest\ncodex --version   # codex-cli 0.160.1"
    },
    {
      "label": "Built-in updater",
      "command": "codex update"
    },
    {
      "label": "Homebrew",
      "command": "brew upgrade --cask codex"
    },
    {
      "label": "Standalone installer (macOS, Linux)",
      "command": "curl -fsSL https://chatgpt.com/codex/install.sh | sh"
    },
    {
      "label": "Pin a version (for example the last one with `codex mcp-server`)",
      "command": "npm i -g @openai/codex@0.153.4"
    }
  ],
  "verified": {
    "date": "2026-10-07",
    "version": "0.160.1",
    "method": "Installed @openai/codex 0.146.1, 0.147.0, 0.153.4, 0.154.0, 0.159.3 and 0.160.1 from npm in throwaway Linux sandboxes with no credentials, captured `--help` for every subcommand (72 pages for 0.160.1) and reproduced the errors below."
  },
  "updated_at": "2026-10-07T12:39:57Z",
  "key_facts": [
    "Latest release: 0.160.1 on 2026-10-05 18:29 UTC (GitHub tag `rust-v0.160.1`; npm publish 18:33 UTC). Previous release: 0.160.0 on 2026-10-01 20:19 UTC.",
    "0.159.3 and 0.160.1 have the same 72 help pages, byte for byte, in our sandbox capture: no command or flag changed.",
    "`codex exec --full-auto` was deprecated in 0.128.0 and removed in 0.147.0 (2026-08-07); use `--sandbox workspace-write`.",
    "`codex mcp-server` was 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-v` tags) in September 2026.",
    "Apache-2.0 licence; 128,141 GitHub stars on 2026-10-07."
  ],
  "releases": [
    {
      "version": "0.160.1",
      "released_at": "2026-10-05T18:29:37Z",
      "url": "https://github.com/openai/codex/releases/tag/rust-v0.160.1",
      "changes": [
        {
          "text": "Remote stdio MCP servers keep `SYSTEMROOT`, `TEMP` and `TMP` when launched with explicitly configured remote environment variables (Windows executor fix).",
          "url": "https://github.com/openai/codex/pull/51121"
        }
      ]
    },
    {
      "version": "0.160.0",
      "released_at": "2026-10-01T20:19:13Z",
      "url": "https://github.com/openai/codex/releases/tag/rust-v0.160.0",
      "changes": [
        {
          "text": "Start sessions outside a project with workspace defaults when policy permits; saved permissions are restored on resume.",
          "url": "https://github.com/openai/codex/pull/49160"
        },
        {
          "text": "Opt-in Guardian review can retrieve earlier user instructions and include context from agent handoffs.",
          "url": "https://github.com/openai/codex/pull/49036"
        },
        {
          "text": "Explicit provider model catalogs no longer include unsupported bundled models.",
          "url": "https://github.com/openai/codex/pull/49135"
        },
        {
          "text": "SQLite stalls during connection setup fixed; initialization errors are surfaced instead of reported as timeouts.",
          "url": "https://github.com/openai/codex/pull/49032"
        }
      ]
    },
    {
      "version": "0.159.3",
      "released_at": "2026-09-30T22:57:34Z",
      "url": "https://github.com/openai/codex/releases/tag/rust-v0.159.3",
      "changes": [
        {
          "text": "Local sessions signed in with ChatGPT can show optional reminders to complete account security setup.",
          "url": "https://github.com/openai/codex/pull/49744"
        }
      ]
    },
    {
      "version": "0.159.2",
      "released_at": "2026-09-29T23:57:16Z",
      "url": "https://github.com/openai/codex/releases/tag/rust-v0.159.2",
      "changes": [
        {
          "text": "No more console windows flashing on Windows for background processes and sandboxed commands.",
          "url": "https://github.com/openai/codex/pull/49385"
        }
      ]
    },
    {
      "version": "0.159.1",
      "released_at": "2026-09-29T20:32:34Z",
      "url": "https://github.com/openai/codex/releases/tag/rust-v0.159.1",
      "changes": [
        {
          "text": "GPT-6.1 Sol is the default model in the bundled catalog and the Amazon Bedrock catalogs (our 0.160.1 sandbox run printed `model: gpt-6.1-sol`).",
          "url": "https://github.com/openai/codex/pull/49323"
        }
      ]
    }
  ],
  "surface": [
    {
      "from": "0.159.3",
      "to": "0.160.1",
      "method": "`bin/tool-snapshot` ran `--help` for every codex subcommand of both versions in a throwaway Linux sandbox (72 and 72 help pages), then `bin/tool-diff` compared them. Hidden flags do not appear in `--help`.",
      "summary": "0 commands added, 0 removed, 0 commands with flags added or removed; 0 help pages changed in any way.",
      "commands_added": [],
      "commands_removed": [],
      "flags": [],
      "notes": [
        "These are the last two minor versions (latest patch of each). Their `--help` output is identical, so 0.160.x changed behaviour, not the command line."
      ]
    },
    {
      "from": "0.153.4",
      "to": "0.154.0",
      "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`.",
      "summary": "0 commands added, 1 removed, 13 commands with flags added or removed; 13 help pages changed in any way.",
      "commands_added": [],
      "commands_removed": [
        "codex mcp-server"
      ],
      "flags": [
        {
          "command": "codex",
          "added": [
            "--worktree"
          ],
          "removed": []
        },
        {
          "command": "codex archive",
          "added": [
            "--worktree"
          ],
          "removed": []
        },
        {
          "command": "codex delete",
          "added": [
            "--worktree"
          ],
          "removed": []
        },
        {
          "command": "codex exec",
          "added": [
            "--worktree"
          ],
          "removed": []
        },
        {
          "command": "codex exec fork",
          "added": [
            "--worktree"
          ],
          "removed": []
        },
        {
          "command": "codex exec resume",
          "added": [
            "--worktree"
          ],
          "removed": []
        },
        {
          "command": "codex exec review",
          "added": [
            "--worktree"
          ],
          "removed": []
        },
        {
          "command": "codex exec-server",
          "added": [
            "--aws-profile",
            "--aws-region",
            "--aws-service",
            "--aws-sigv4",
            "--remote-transport"
          ],
          "removed": []
        },
        {
          "command": "codex exec-server forward",
          "added": [
            "--aws-profile",
            "--aws-region",
            "--aws-service",
            "--aws-sigv4",
            "--remote-transport"
          ],
          "removed": []
        },
        {
          "command": "codex fork",
          "added": [
            "--worktree"
          ],
          "removed": []
        },
        {
          "command": "codex queue",
          "added": [
            "--worktree"
          ],
          "removed": []
        },
        {
          "command": "codex resume",
          "added": [
            "--worktree"
          ],
          "removed": []
        },
        {
          "command": "codex unarchive",
          "added": [
            "--worktree"
          ],
          "removed": []
        }
      ],
      "notes": [
        "`codex mcp-server` disappears from the top-level command list; `--worktree` arrives on 12 commands."
      ]
    },
    {
      "from": "0.146.1",
      "to": "0.147.0",
      "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`.",
      "summary": "0 commands added, 0 removed, 8 commands with flags added or removed; 31 help pages changed in any way.",
      "commands_added": [],
      "commands_removed": [],
      "flags": [
        {
          "command": "codex",
          "added": [
            "--approve-for-me"
          ],
          "removed": []
        },
        {
          "command": "codex archive",
          "added": [
            "--approve-for-me"
          ],
          "removed": []
        },
        {
          "command": "codex delete",
          "added": [
            "--approve-for-me"
          ],
          "removed": []
        },
        {
          "command": "codex exec",
          "added": [
            "--approve-for-me"
          ],
          "removed": []
        },
        {
          "command": "codex exec-server",
          "added": [
            "--concurrent-requests",
            "--exit-on-stdin-close"
          ],
          "removed": []
        },
        {
          "command": "codex fork",
          "added": [
            "--approve-for-me"
          ],
          "removed": []
        },
        {
          "command": "codex resume",
          "added": [
            "--approve-for-me"
          ],
          "removed": []
        },
        {
          "command": "codex unarchive",
          "added": [
            "--approve-for-me"
          ],
          "removed": []
        }
      ],
      "notes": [
        "The removal of `codex exec --full-auto` does not show here: the flag was hidden from `--help` before it was removed. See the gotcha below for the error it now produces."
      ]
    }
  ],
  "breaking": [
    {
      "version": "0.159.0",
      "change": "Removed automatic follow-up prompt suggestions and the `tui.prompt_suggestions` setting; removed the bundled `plugin-creator` skill.",
      "migrate": "Delete `tui.prompt_suggestions` from `~/.codex/config.toml`; install the plugin-creator skill separately if you used it.",
      "url": "https://github.com/openai/codex/releases/tag/rust-v0.159.0"
    },
    {
      "version": "0.154.0",
      "change": "The deprecated `codex mcp-server` entry point (Codex as a stdio MCP server) and the `codex-mcp-server` crate were removed.",
      "migrate": "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`.",
      "url": "https://github.com/openai/codex/pull/42993"
    },
    {
      "version": "0.147.0",
      "change": "Removed the hidden, deprecated `codex exec --full-auto` flag and its implicit mapping to the `workspace-write` sandbox.",
      "migrate": "`codex exec --full-auto` → `codex exec --sandbox workspace-write`. 0.147.0 also added `--approve-for-me` (automatic review of approval requests).",
      "url": "https://github.com/openai/codex/pull/36054",
      "fix_page": "https://insidetheloop.dev/fixes/codex-exec-full-auto-removed"
    },
    {
      "version": "0.140.0",
      "change": "Removed the experimental `/realtime` voice controls from the TUI.",
      "migrate": "Voice came back as `/voice` (experimental in 0.155.0, on by default with an F8 toggle in 0.156.0).",
      "url": "https://github.com/openai/codex/releases/tag/rust-v0.140.0"
    }
  ],
  "gotchas": [
    {
      "title": "`codex exec --full-auto` fails with unexpected argument",
      "version": "0.160.1",
      "command": "codex exec --full-auto \"say hi\"",
      "output": "error: unexpected argument '--full-auto' found\n\n  tip: to pass '--full-auto' as a value, use '-- --full-auto'\n\nUsage: codex exec [OPTIONS] [PROMPT]\n       codex exec [OPTIONS] <COMMAND> [ARGS]\n\nFor more information, try '--help'.\n# exit 2. In 0.146.1 the same command printed: warning: `--full-auto` is deprecated; use `--sandbox workspace-write` instead.",
      "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.",
      "url": "https://github.com/openai/codex/pull/36054",
      "fix_page": "https://insidetheloop.dev/fixes/codex-exec-full-auto-removed"
    },
    {
      "title": "`codex mcp-server` no longer starts an MCP server",
      "version": "0.160.1",
      "command": "codex mcp-server </dev/null",
      "output": "Error: stdin is not a terminal\n# exit 1",
      "fix": "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`.",
      "url": "https://github.com/openai/codex/pull/42993"
    },
    {
      "title": "`codex exec` refuses to run outside a Git repository",
      "version": "0.160.1",
      "command": "cd /tmp && codex exec --sandbox workspace-write \"say hi\"",
      "output": "Reading additional input from stdin...\nNot inside a trusted directory and --skip-git-repo-check was not specified.\n# exit 1",
      "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.",
      "url": "https://github.com/openai/codex/releases/tag/rust-v0.160.1",
      "fix_page": "https://insidetheloop.dev/fixes/codex-exec-not-inside-trusted-directory"
    },
    {
      "title": "Linux sandbox warns that bubblewrap is missing",
      "version": "0.160.1",
      "command": "codex exec --skip-git-repo-check --sandbox workspace-write \"say hi\"   # Debian 13 container",
      "output": "warning: 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.",
      "url": "https://developers.openai.com/codex/concepts/sandboxing#prerequisites"
    }
  ],
  "monthly": [
    {
      "month": "2026-10",
      "versions": "0.160.0 to 0.160.1 (2 releases to 2026-10-07)",
      "highlights": [
        {
          "text": "0.160.0: projectless sessions with workspace defaults; Guardian review context.",
          "url": "https://github.com/openai/codex/releases/tag/rust-v0.160.0"
        }
      ]
    },
    {
      "month": "2026-09",
      "versions": "0.152.0 to 0.159.3 (19 releases)",
      "highlights": [
        {
          "text": "0.154.0 (2026-09-09) removed `codex mcp-server` and added experimental `--worktree` sessions.",
          "url": "https://github.com/openai/codex/releases/tag/rust-v0.154.0"
        },
        {
          "text": "0.157.0 added GPT-6 Sol and Luna; 0.159.1 made GPT-6.1 Sol the bundled default.",
          "url": "https://github.com/openai/codex/releases/tag/rust-v0.157.0"
        },
        {
          "text": "0.156.0 added `/tui` fullscreen UI, voice by default and `--no-daemon`; 0.159.0 removed `tui.prompt_suggestions`.",
          "url": "https://github.com/openai/codex/releases/tag/rust-v0.156.0"
        }
      ]
    },
    {
      "month": "2026-08",
      "versions": "0.146.1 to 0.151.0 (8 releases)",
      "highlights": [
        {
          "text": "0.147.0 (2026-08-07) removed `codex exec --full-auto` and added `--approve-for-me`.",
          "url": "https://github.com/openai/codex/releases/tag/rust-v0.147.0"
        },
        {
          "text": "0.148.0 added `codex exec fork`; 0.149.0 added the `codex agents` dashboard and `codex queue`.",
          "url": "https://github.com/openai/codex/releases/tag/rust-v0.149.0"
        }
      ]
    },
    {
      "month": "2026-07",
      "versions": "0.142.5 to 0.146.0 (11 releases)",
      "highlights": [
        {
          "text": "0.143.0 enabled remote plugins by default and added `codex remote-control pair`.",
          "url": "https://github.com/openai/codex/releases/tag/rust-v0.143.0"
        },
        {
          "text": "0.145.0 expanded `/import` to migrate Cursor and Claude Code settings, MCP servers and sessions.",
          "url": "https://github.com/openai/codex/releases/tag/rust-v0.145.0"
        }
      ]
    },
    {
      "month": "2026-06",
      "versions": "0.136.0 to 0.142.4 (11 releases)",
      "highlights": [
        {
          "text": "0.136.0 added `codex archive` and `codex unarchive`; 0.140.0 added `codex delete` and removed `/realtime`.",
          "url": "https://github.com/openai/codex/releases/tag/rust-v0.140.0"
        }
      ]
    },
    {
      "month": "2026-05",
      "versions": "0.129.0 to 0.135.0 (7 releases)",
      "highlights": [
        {
          "text": "0.129.0 added Vim editing in the composer; 0.132.0 let `codex exec resume` take `--output-schema`.",
          "url": "https://github.com/openai/codex/releases/tag/rust-v0.132.0"
        }
      ]
    }
  ],
  "sources": [
    {
      "title": "openai/codex releases (GitHub API)",
      "url": "https://api.github.com/repos/openai/codex/releases",
      "read": "2026-10-07"
    },
    {
      "title": "@openai/codex on the npm registry",
      "url": "https://registry.npmjs.org/@openai/codex",
      "read": "2026-10-07"
    },
    {
      "title": "Codex CLI 0.160.1 release notes",
      "url": "https://github.com/openai/codex/releases/tag/rust-v0.160.1",
      "read": "2026-10-07"
    },
    {
      "title": "Codex CLI 0.160.0 release notes",
      "url": "https://github.com/openai/codex/releases/tag/rust-v0.160.0",
      "read": "2026-10-07"
    },
    {
      "title": "Codex CLI 0.159.0 release notes",
      "url": "https://github.com/openai/codex/releases/tag/rust-v0.159.0",
      "read": "2026-10-07"
    },
    {
      "title": "Codex CLI 0.154.0 release notes",
      "url": "https://github.com/openai/codex/releases/tag/rust-v0.154.0",
      "read": "2026-10-07"
    },
    {
      "title": "Codex CLI 0.147.0 release notes",
      "url": "https://github.com/openai/codex/releases/tag/rust-v0.147.0",
      "read": "2026-10-07"
    },
    {
      "title": "Codex CLI 0.128.0 release notes (`--full-auto` deprecated)",
      "url": "https://github.com/openai/codex/releases/tag/rust-v0.128.0",
      "read": "2026-10-07"
    },
    {
      "title": "PR #42993: remove the deprecated codex mcp-server command",
      "url": "https://github.com/openai/codex/pull/42993",
      "read": "2026-10-07"
    },
    {
      "title": "PR #36054: remove legacy --full-auto handling from codex exec",
      "url": "https://github.com/openai/codex/pull/36054",
      "read": "2026-10-07"
    },
    {
      "title": "Codex README at rust-v0.160.1 (install methods)",
      "url": "https://github.com/openai/codex/blob/rust-v0.160.1/README.md",
      "read": "2026-10-07"
    },
    {
      "title": "openai/codex repository (stars, licence)",
      "url": "https://github.com/openai/codex",
      "read": "2026-10-07"
    }
  ],
  "fixes": [
    {
      "url": "https://insidetheloop.dev/fixes/codex-exec-full-auto-removed",
      "error": "error: unexpected argument '--full-auto' found"
    },
    {
      "url": "https://insidetheloop.dev/fixes/codex-exec-not-inside-trusted-directory",
      "error": "Not inside a trusted directory and --skip-git-repo-check was not specified."
    }
  ]
}
