- App-server integrations now support Unix socket transport, pagination-friendly resume/fork, sticky environments, and remote thread config/store plumbing. (#18255, #18892, #18897, #18908, #19008, #19014) - App-server plugin management can install remote plugins and upgrade configured marketplaces. (#18917, #19074) - Permission profiles now round-trip across TUI sessions, user turns, MCP sandbox state, shell escalation, and app-server APIs. (#18284, #18285, #18286, #18287, #19231) - Model providers now own model discovery, with AWS/Bedrock account state exposed to app clients. (#18950, #19048) - `codex exec --json` now reports reasoning-token usage for programmatic consumers. (#19308) - Rollout tracing now records tool, code-mode, session, and multi-agent relationships, with a debug reducer command for inspection. (#18878, #18879, #18880) ## Bug Fixes - Interrupting `/review` and exiting the TUI no longer leaves the interface wedged on delegate startup or unsubscribe. (#18921) - Exec-server no longer drops buffered output after process exit and now waits correctly for stream closure. (#18946, #19130) - App-server now respects explicitly untrusted project config instead of auto-persisting trust. (#18626) - WebSocket app-server clients are less likely to disconnect during bursts of turn and tool-output notifications. (#19246) - Windows sandbox startup handles multiple CLI versions and installed app directories better, and background `Start-Process` calls avoid visible PowerShell windows. (#19044, #19180, #19214) - Config/schema handling now rejects conflicting MultiAgentV2 thread limits, resolves relative agent-role config paths, hides unsupported MCP bearer-token fields, and rejects invalid `js_repl` image MIME types. (#19129, #19261, #19294, #19292) ## Documentation - App-server docs and generated schemas were refreshed for the new transport, thread, marketplace, sticky environment, and permission-profile APIs. (#18255, #18897, #19014, #19074, #19231) - Rollout-trace documentation now covers the debug trace reduction workflow. (#18880) ## Chores - Refreshed `models.json` and related core, app-server, SDK, and TUI fixtures for the latest model catalog and reasoning defaults. (#19323) - Windows Bazel CI now uses a stable PATH and shared query startup path for better cache reuse. (#19161, #19232) - Plugin marketplace add/remove/startup-sync internals moved out of `codex-core`, and curated plugin cache versions now use short SHAs. (#19099, #19095) - Reverted a macOS signing entitlement change after it caused alpha startup failures. (#19167, #19350) - Stabilized flaky approval-popup and plugin MCP tool-discovery tests. (#19178, #19191) ## Changelog Full Changelog: https://github.com/openai/codex/compare/rust-v0.124.0...rust-v0.125.0 - #19129 Reject agents.max_threads with multi_agent_v2 @jif-oai - #19130 exec-server: wait for close after observed exit @jif-oai - #19149 Update safety check wording @etraut-openai - #18284 tui: sync session permission profiles @bolinfest - #18710 [codex] Fix plugin marketplace help usage @xli-oai - #19127 feat: drop spawned-agent context instructions @jif-oai - #18892 Add remote thread config loader protos @rasmusrygaard - #19014 Add excludeTurns parameter to thread/resume and thread/fork @ddr-oai - #18882 [codex] Route live thread writes through ThreadStore @wiltzius-openai - #19008 [codex] Implement remote thread store methods @wiltzius-openai - #18626 Respect explicit untrusted project config @etraut-openai - #18255 app-server: add Unix socket transport @euroelessar - #19167 ci: add macOS keychain entitlements @euroelessar - #19099 Move marketplace add/remove and startup sync out of core. @xl-openai - #19168 Use Auto-review wording for fallback rationale @maja-openai - #18908 Add remote thread config endpoint @rasmusrygaard - #18285 tui: carry permission profiles on user turns @bolinfest - #18286 mcp: include permission profiles in sandbox state @bolinfest - #18878 [rollout_trace] Trace tool and code-mode boundaries @cassirer-openai - #18287 shell-escalation: carry resolved permission profiles @bolinfest - #18946 fix(exec-server): retain output until streams close @bolinfest - #19074 Add app-server marketplace upgrade RPC @xli-oai - #19180 use a version-specific suffix for command runner binary in .sandbox-bin @iceweasel-oai - #19178 Stabilize approvals popup disabled-row test @etraut-openai - #18921 Fix /review interrupt and TUI exit wedges @etraut-openai - #19191 Stabilize plugin MCP tools test @etraut-openai - #19194 Mark hooks schema fixtures as generated @abhinav-oai - #18288 tests: isolate approval fixtures from host rules @bolinfest - #19044 guide Windows to use -WindowStyle Hidden for Start-Process calls @iceweasel-oai - #19214 do not attempt ACLs on installed codex dir @iceweasel-oai - #19161 ci: derive cache-stable Windows Bazel PATH @bolinfest - #18811 refactor: route Codex auth through AuthProvider @efrazer-oai - #19246 Increase app-server WebSocket outbound buffer @etraut-openai - #19048 feat: expose AWS account state from account/read @celia-oai - #18880 [rollout_trace] Add debug trace reduction command @cassirer-openai - #18897 Add sticky environment API and thread state @starr-openai - #18879 [rollout_trace] Trace sessions and multi-agent edges @cassirer-openai - #19095 feat: Use short SHA versions for curated plugin cache entries @xl-openai - #18950 feat: let model providers own model discovery @celia-oai - #19206 app-server: persist device key bindings in sqlite @euroelessar - #18917 [codex] Support remote plugin install writes @xli-oai - #19231 permissions: make profiles represent enforcement @bolinfest - #19261 Resolve relative agent role config paths from layers @etraut-openai - #19232 ci: reuse Bazel CI startup for target-discovery queries @bolinfest - #19292 Reject unsupported js_repl image MIME types @etraut-openai - #19247 chore: apply truncation policy to unified_exec @sayan-oai - #19294 Hide unsupported MCP bearer_token from config schema @etraut-openai - #19308 Surface reasoning tokens in exec JSON usage @etraut-openai - #19323 Update models.json and related fixtures @sayan-oai - #19350 fix alpha build @jif-oai
Codex CLI (Rust Implementation)
We provide Codex CLI as a standalone 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. If you provide both a prompt argument and piped stdin, Codex appends stdin as a <stdin> block after the prompt so patterns like echo "my output" | codex exec "Summarize this concisely" work naturally. 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.