- App-server TUI now supports device-code ChatGPT sign-in during onboarding and can refresh existing ChatGPT tokens. (#14952) - Plugin setup is smoother: Codex can prompt to install missing plugins or connectors, honor a configured suggestion allowlist, and sync install/uninstall state remotely. (#14896, #15022, #14878) - Added a `userpromptsubmit` hook so prompts can be blocked or augmented before execution and before they enter history. (#14626) - Realtime sessions now start with recent thread context and are less likely to self-interrupt during audio playback. (#14829, #14827) ## Bug Fixes - Fixed a first-turn stall where websocket prewarm could delay `turn/start`; startup now times out and falls back cleanly. (#14838) - Restored conversation history for remote resume/fork in the app-server TUI and stopped duplicate live transcript output from legacy stream events. (#14930, #14892) - Improved Linux sandbox startup on symlinked checkouts, missing writable roots, and Ubuntu/AppArmor hosts by preferring system `bwrap` when available. (#14849, #14890, #14963) - Fixed an agent job finalization race and reduced status polling churn for worker threads. (#14843) ## Documentation - Refreshed the Python SDK public API docs, examples, and walkthrough around the generated app-server models. (#14446) ## Chores - Pinned the `setup-zig` GitHub Action to an immutable SHA for more reproducible CI. (#14858) ## Changelog Full Changelog: https://github.com/openai/codex/compare/rust-v0.115.0...rust-v0.116.0 - #14717 Move TUI on top of app server (parallel code) @etraut-openai - #14665 Use request permission profile in app server @mousseau-oai - #14826 Fixed build failures related to PR 14717 @etraut-openai - #14833 fix(core): fix sanitize name to use '_' everywhere @apanasenko-oai - #14268 memories: exclude AGENTS and skills from stage1 input @andi-oai - #14139 windows-sandbox: add runner IPC foundation for future unified_exec @iceweasel-oai - #14851 Add exit helper to code mode scripts @pakrym-oai - #14828 [stack 1/4] Split realtime websocket methods by version @aibrahim-oai - #14652 Apply argument comment lint across codex-rs @bolinfest - #14837 skill-creator: default new skills to ~/.codex/skills @xl-openai - #14861 Add marketplace display names to plugin/list @xl-openai - #14878 feat: support remote_sync for plugin install/uninstall. @xl-openai - #14830 [stack 2/4] Align main realtime v2 wire and runtime flow @aibrahim-oai - #14886 fix: align marketplace display name with existing interface conventions @xl-openai - #14881 [codex] add Jason as a predefined subagent name @tibo-openai - #14864 fix: tighten up shell arg quoting in GitHub workflows @bolinfest - #14829 [stack 3/4] Add current thread context to realtime startup @aibrahim-oai - #14827 [stack 4/4] Reduce realtime self-interruptions during playback @aibrahim-oai - #14849 fix: canonicalize symlinked Linux sandbox cwd @viyatb-oai - #14892 Fix tui_app_server: ignore duplicate legacy stream events @etraut-openai - #14899 Revert tui code so it does not rely on in-process app server @etraut-openai - #14890 fix(linux-sandbox): ignore missing writable roots @viyatb-oai - #14920 feat: centralize package manager version @jif-oai - #14935 feat: rename to get more explicit close agent @jif-oai - #14843 Fix agent jobs finalization race and reduce status polling churn @daveaitel-openai - #14944 feat: show effective model in spawn agent event @jif-oai - #14838 fix(core): prevent hanging turn/start due to websocket warming issues @owenlin0 - #14859 Feat: CXA-1831 Persist latest model and reasoning effort in sqlite @shijie-oai - #14930 fix(tui): restore remote resume and fork history @fcoury - #14955 Fix fuzzy search notification buffering in app-server tests @aibrahim-oai - #14938 feat: add suffix to shell snapshot name @jif-oai - #14959 Fix code mode yield startup race @aibrahim-oai - #14434 generate an internal json schema for `RolloutLine` @keyz - #14846 use framed IPC for elevated command runner @iceweasel-oai - #14952 Add device-code onboarding and ChatGPT token refresh to app-server TUI @etraut-openai - #14896 [plugins] Support plugin installation elicitation. @mzeng-openai - #14958 Stabilize Windows cmd-based shell test harnesses @aibrahim-oai - #14966 Stabilize permissions popup selection tests @aibrahim-oai - #14968 Stabilize approval matrix write-file command @aibrahim-oai - #14986 temporarily disable private desktop until it works with elevated IPC path @iceweasel-oai - #14983 Rename exec_wait tool to wait @pakrym-oai - #14905 Add auth env observability @ccy-oai - #14931 fix(tui): implement /mcp inventory for tui_app_server @fcoury - #14977 Cleanup skills/remote/xxx endpoints. @xl-openai - #14984 Gate realtime audio interruption logic to v2 @aibrahim-oai - #14902 Unify realtime shutdown in core @aibrahim-oai - #14963 fix(linux-sandbox): prefer system /usr/bin/bwrap when available @viyatb-oai - #14446 Add Python SDK public API and examples @shaqayeq-oai - #14993 feat: Add product-aware plugin policies and clean up manifest naming @xl-openai - #14995 app-server: reject websocket requests with Origin headers @maxj-oai - #14960 Add FS abstraction and use in view_image @pakrym-oai - #14293 fix: honor active permission profiles in sandbox debug @viyatb-oai - #14610 feat: support restricted ReadOnlyAccess in elevated Windows sandbox @viyatb-oai - #13592 Prefer websockets when providers support them @pakrym-oai - #14903 Handle realtime conversation end in the TUI @aibrahim-oai - #14727 Use workspace requirements for guardian prompt override @charley-oai - #14626 [hooks] userpromptsubmit - hook before user's prompt is executed @eternal-openai - #14858 Pin setup-zig GitHub Action to immutable SHA @viyatb-oai - #13702 fix(subagents) share execpolicy by default @dylan-hurd-oai - #15022 [plugins] Support configuration tool suggest allowlist. @mzeng-openai - #14947 feat: adapt artifacts to new packaging and 2.5.6 @jif-oai - #14821 feat: add memory citation to agent message @jif-oai - #15058 nit: disable live memory edition @jif-oai - #14942 Removed remaining core events from tui_app_server @etraut-openai - #15059 chore: disable memory read path for morpheus @jif-oai - #14842 Add notify to code-mode @pakrym-oai - #15020 fix: harden plugin feature gating @xl-openai
Codex CLI (Rust Implementation)
We provide Codex CLI as a standalone, native executable to ensure a zero-dependency install.
Installing Codex
Today, the easiest way to install Codex is via npm:
npm i -g @openai/codex
codex
You can also install via Homebrew (brew install --cask codex) or download a platform-specific release directly from our GitHub Releases.
Documentation quickstart
- First run with Codex? Start with
docs/getting-started.md(links to the walkthrough for prompts, keyboard shortcuts, and session management). - Want deeper control? See
docs/config.mdanddocs/install.md.
What's new in the Rust CLI
The Rust implementation is now the maintained Codex CLI and serves as the default experience. It includes a number of features that the legacy TypeScript CLI never supported.
Config
Codex supports a rich set of configuration options. Note that the Rust CLI uses config.toml instead of config.json. See docs/config.md for details.
Model Context Protocol Support
MCP client
Codex CLI functions as an MCP client that allows the Codex CLI and IDE extension to connect to MCP servers on startup. See the configuration documentation for details.
MCP server (experimental)
Codex can be launched as an MCP server by running codex mcp-server. This allows other MCP clients to use Codex as a tool for another agent.
Use the @modelcontextprotocol/inspector to try it out:
npx @modelcontextprotocol/inspector codex mcp-server
Use codex mcp to add/list/get/remove MCP server launchers defined in config.toml, and codex mcp-server to run the MCP server directly.
Notifications
You can enable notifications by configuring a script that is run whenever the agent finishes a turn. The notify documentation includes a detailed example that explains how to get desktop notifications via terminal-notifier on macOS. When Codex detects that it is running under WSL 2 inside Windows Terminal (WT_SESSION is set), the TUI automatically falls back to native Windows toast notifications so approval prompts and completed turns surface even though Windows Terminal does not implement OSC 9.
codex exec to run Codex programmatically/non-interactively
To run Codex non-interactively, run codex exec PROMPT (you can also pass the prompt via stdin) and Codex will work on your task until it decides that it is done and exits. Output is printed to the terminal directly. You can set the RUST_LOG environment variable to see more about what's going on.
Use codex exec --ephemeral ... to run without persisting session rollout files to disk.
Experimenting with the Codex Sandbox
To test to see what happens when a command is run under the sandbox provided by Codex, we provide the following subcommands in Codex CLI:
# macOS
codex sandbox macos [--full-auto] [--log-denials] [COMMAND]...
# Linux
codex sandbox linux [--full-auto] [COMMAND]...
# Windows
codex sandbox windows [--full-auto] [COMMAND]...
# Legacy aliases
codex debug seatbelt [--full-auto] [--log-denials] [COMMAND]...
codex debug landlock [--full-auto] [COMMAND]...
Selecting a sandbox policy via --sandbox
The Rust CLI exposes a dedicated --sandbox (-s) flag that lets you pick the sandbox policy without having to reach for the generic -c/--config option:
# Run Codex with the default, read-only sandbox
codex --sandbox read-only
# Allow the agent to write within the current workspace while still blocking network access
codex --sandbox workspace-write
# Danger! Disable sandboxing entirely (only do this if you are already running in a container or other isolated env)
codex --sandbox danger-full-access
The same setting can be persisted in ~/.codex/config.toml via the top-level sandbox_mode = "MODE" key, e.g. sandbox_mode = "workspace-write".
In workspace-write, Codex also includes ~/.codex/memories in its writable roots so memory maintenance does not require an extra approval.
Code Organization
This folder is the root of a Cargo workspace. It contains quite a bit of experimental code, but here are the key crates:
core/contains the business logic for Codex. Ultimately, we hope this to be a library crate that is generally useful for building other Rust/native applications that use Codex.exec/"headless" CLI for use in automation.tui/CLI that launches a fullscreen TUI built with Ratatui.cli/CLI multitool that provides the aforementioned CLIs via subcommands.
If you want to contribute or inspect behavior in detail, start by reading the module-level README.md files under each crate and run the project workspace from the top-level codex-rs directory so shared config, features, and build scripts stay aligned.