Files
codex/codex-rs
Michael Bolin 28c32c6940 ## New Features
- Add multi-conversation “agent control” so a session can spawn or message other conversations programmatically (#8783, #8788)
- Add app-server `thread/rollback` so IDE clients can undo the last N turns without rewriting history (#8454)
- Add `web_search_cached` to enable cached-only Web Search results as a safer alternative to live requests (#8795)
- Allow global exec flags (model/json/sandbox toggles, etc.) to be passed after `codex exec resume` (#8440)
- Show time/version-targeted announcement tips in the TUI, driven by a TOML file in the repo (#8752)
- Add an `[analytics] enabled=...` config section to control analytics behavior (#8350)

## Bug Fixes
- Fix TUI2 transcripts so streamed markdown reflows on resize and copy/paste preserves soft wraps (#8761)
- Make `apply_patch` parsing tolerant of whitespace-padded `*** Begin Patch` / `*** End Patch` markers (#8746)
- Render paths relative to the current working directory before checking git roots, improving output in non-git workspaces (#8771)
- Prevent `CODEX_MANAGED_CONFIG_PATH` from overriding managed config in production, closing a policy bypass (#8762)
- Ensure app-server conversations respect the config passed in by the client (#8765)
- Reduce TUI UX glitches: suppress popups when browsing input history, fix copy “pill” rendering, and clear background terminals on interrupt (#8772, #8777, #8786)

## Documentation
- Clarify onboarding/login guidance for headless/remote setups by steering users to `codex login --device-auth` (#8753)
- Update model examples used in tooling/config to current `gpt-5.2` naming (#8566)

## Chores
- Refactor skills discovery to use the config layer stack so all configured skill folders are considered (#8497)
- Auto-populate GitHub release notes at release creation time (#8799)
- Add more `apply_patch` test scenarios to harden coverage (#8230)
- Tweak unified exec event emission to only send “begin” when a PTY is present (#8780)

## Changelog

Full Changelog: https://github.com/openai/codex/compare/rust-v0.78.0...rust-v0.79.0

- #8753 [device-auth] Update login instruction for headless environments. @mzeng-openai
- #8497 Use ConfigLayerStack for skills discovery. @xl-openai
- #8440 Allow global exec flags after `resume` and fix CI codex build/timeout @fjord-oai
- #8230 chore(apply-patch) additional scenarios @dylan-hurd-oai
- #8746 fix: accept whitespace-padded patch markers @tibo-openai
- #8761 tui2: stop baking streaming wraps; reflow agent markdown @joshka-oai
- #8771 fix: render cwd-relative paths in tui @joshka-oai
- #8770 fix: fix readiness subscribe token wrap-around @tibo-openai
- #8780 chore: emit unified exec begin only when PTY exist @jif-oai
- #8762 fix: stop honoring CODEX_MANAGED_CONFIG_PATH environment variable in production @bolinfest
- #8566 fix: update model examples to gpt-5.2 @seuros
- #8735 feat: add head-tail buffer for `unified_exec` @jif-oai
- #8331 chore: add model/list call to app-server-test-client @owenlin0
- #8752 feat: forced tool tips @jif-oai
- #8786 chore: clear background terminals on interrupt @jif-oai
- #8350 feat: add analytics config setting @JaviSoto
- #8783 feat: agent controller @jif-oai
- #8772 suppress popups while browsing input history @xl-openai
- #8777 Clear copy pill background and add snapshot test @joshka-oai
- #8788 feat: drop agent bus and store the agent status in codex directly @jif-oai
- #8454 feat(app-server): thread/rollback API @owenlin0
- #8765 [app-server] fix config loading for conversations @celia-oai
- #8795 add web_search_cached flag @sayan-oai
- #8799 fix: populate the release notes when the release is created @bolinfest
2026-01-06 16:25:36 -08:00
..
2026-01-06 14:53:59 -08:00
2025-12-11 13:40:48 -08:00
2026-01-06 16:25:36 -08:00
2026-01-03 02:19:52 -08: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.

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.