Files
codex/codex-rs
Ahmed Ibrahim 19f8797c0f ## New Features
- You can now fork a thread into sub-agents, making it easier to branch work without leaving the current conversation. (#12499)
- Realtime voice sessions now let you pick microphone and speaker devices, persist those choices, and send audio in a format better aligned with transcription. (#12849, #12850, #13030)
- Custom tools can now return multimodal output, including structured content like images, instead of being limited to plain text. (#12948)
- The app server now exposes richer model availability and upgrade metadata, and the TUI uses it to explain plan-gated models with limited-run tooltips. (#12958, #12972, #13021)
- Memories are now configurable, and there is a new `codex debug clear-memories` command to fully reset saved memory state when needed. (#12997, #12999, #13002, #13085)

## Bug Fixes
- Reconnecting with `thread/resume` now restores pending approval and input requests instead of leaving clients out of sync. (#12560)
- `thread/start` no longer blocks unrelated app-server requests, reducing stalls during slow startup paths such as MCP auth checks. (#13033)
- Interactive terminal sessions no longer print the final assistant response twice. (#13082)
- Large pasted-content placeholders now survive file completion correctly, fixing a regression from `0.106.0`. (#13070)
- ChatGPT accounts that arrive without plan info now handle account reads correctly instead of triggering repeated login issues. (#13072)
- Diff rendering in the TUI now respects theme colors better and displays more cleanly in Windows Terminal and other low-color environments. (#13016, #13037)
- MCP OAuth login flows now forward configured `oauth_resource` values correctly for servers that require a `resource` parameter. (#12866)

## Documentation
- Updated sandbox escalation guidance so dependency-install failures caused by sandboxed network access are more clearly treated as escalation candidates. (#13051)

## Chores
- Tightened sandbox filesystem behavior by improving restricted read-only handling on Linux and avoiding sensitive directories like `~/.ssh` on Windows. (#12369, #12835)
- Escalated shell commands now keep their sandbox configuration when rerun, closing a gap where approvals could lose the intended restrictions. (#12839)

## Changelog

Full Changelog: https://github.com/openai/codex/compare/rust-v0.106.0...rust-v0.107.0

- #12925 chore: calm down awaiter @jif-oai
- #12499 feat: fork thread multi agent @jif-oai
- #12837 Log js_repl nested tool responses in rollout history @fjord-oai
- #12774 feat: add post-compaction sub-agent infos @jif-oai
- #12929 Remove noisy log @pakrym-oai
- #12835 don't grant sandbox read access to ~/.ssh and a few other dirs. @iceweasel-oai
- #12839 feat: include sandbox config with escalation request @bolinfest
- #12940 feat: add git info to memories @jif-oai
- #12727 tui: use thread_id for resume/fork cwd resolution @charley-oai
- #12950 Allow clients not to send summary as an option @pakrym-oai
- #12944 fix: sort codex features list alphabetically @bolinfest
- #12849 Add realtime audio device config @aibrahim-oai
- #12957 test: move unix_escalation tests into sibling file @bolinfest
- #12947 feat: add local date/timezone to turn environment context @celia-oai
- #12959 Make realtime audio test deterministic @aibrahim-oai
- #12958 Feat: cxa-1833 update model/list @shijie-oai
- #12850 Add realtime audio device picker @aibrahim-oai
- #12948 Support multimodal custom tool outputs @fjord-oai
- #12745 [apps] Improve app/list with force_fetch=true @mzeng-openai
- #12866 Add oauth_resource handling for MCP login flows @etraut-openai
- #12936 Add a background job to refresh the requirements local cache @alexsong-oai
- #12972 Add model availability NUX metadata @aibrahim-oai
- #12981 Add realtime websocket tracing @aibrahim-oai
- #12968 notify: include client in legacy hook payload @bolinfest
- #12997 feat: add use memories config @jif-oai
- #12999 feat: gen memories config @jif-oai
- #13002 feat: use the memory mode for phase 1 extraction @jif-oai
- #13001 chore: tmp remove awaiter @jif-oai
- #13011 fix: more stable notify script @jif-oai
- #12970 fix: use AbsolutePathBuf for permission profile file roots @bolinfest
- #13016 fix(tui): promote windows terminal diff ansi16 to truecolor @fcoury
- #13030 Align TUI voice transcription audio with 4o ASR @nornagon-openai
- #13047 app-server: deflake running thread resume tests @bolinfest
- #12560 app-server: Replay pending item requests on `thread/resume` @euroelessar
- #13055 fix: disable Bazel builds in CI on ubuntu-24.04-arm until we can stabilize them @bolinfest
- #12964 execpolicy: add host_executable() path mappings @bolinfest
- #13051 Clarify escalation guidance for sandbox-related network failures @daniel-oai
- #12612 Unify rollout reconstruction with resume/fork TurnContext hydration @charley-oai
- #13067 [apps] Stablize app list updated event. @mzeng-openai
- #12369 feat(linux-sandbox): support restricted ReadOnlyAccess in bwrap @viyatb-oai
- #13037 fix(tui): theme-aware diff backgrounds with fallback behavior @fcoury
- #13070 Keep large-paste placeholders intact during file completion @etraut-openai
- #13072 Handle missing plan info for ChatGPT accounts @etraut-openai
- #13021 Add model availability NUX tooltips @aibrahim-oai
- #13080 app-server: Add an ability to watch events in the test client @euroelessar
- #13082 Suppress duplicate assistant output on stdout in interactive sessions @etraut-openai
- #13033 fix(app-server): make thread/start non-blocking @owenlin0
- #13046 core: adopt host_executable() rules in zsh-fork @bolinfest
- #13084 app-server: Add `ephemeral` field to `Thread` object @euroelessar
- #13085 feat: add debug clear-memories command to hard-wipe memories state @sayan-oai
2026-03-02 10:17:13 -07:00
..
2026-02-25 20:59:07 -08:00
2026-02-24 13:38:28 -08:00
2026-01-28 17:46:18 +00:00
2026-03-02 10:17:13 -07:00

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

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".

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.