This repository has been archived on 2026-10-29. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
Epiphany/vendor/codex/codex-rs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-05-30 23:35:19 +01:00
..
.cargo Fix app-server stack pressure in tests 2026-04-24 20:01:54 +01:00
.config Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
.github/workflows Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
agent-identity Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
analytics Remove Codex skill config residue 2026-05-14 03:20:50 +01:00
ansi-escape Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
app-server Move Epiphany prompt launch authority into core 2026-05-28 21:02:26 +01:00
app-server-client Remove app list protocol and connectors crate 2026-05-13 20:47:01 +01:00
app-server-protocol Add fixed Eyes research lane 2026-05-30 01:02:16 +01:00
app-server-test-client Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
apply-patch Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
arg0 Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
async-utils Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
aws-auth Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
backend-client Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
cli Purge Codex product label residue 2026-05-14 05:57:11 +01:00
cloud-requirements Remove Codex app config surfaces 2026-05-13 22:19:52 +01:00
cloud-tasks Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
cloud-tasks-client Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
cloud-tasks-mock-client Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
code-mode Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
codex-api Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
codex-backend-openapi-models Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
codex-client Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
codex-experimental-api-macros Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
codex-mcp Purge Codex product label residue 2026-05-14 05:57:11 +01:00
collaboration-mode-templates Purge Codex product label residue 2026-05-14 05:57:11 +01:00
config Remove Codex skill config residue 2026-05-14 03:20:50 +01:00
core Move Epiphany thread policy to bridge 2026-05-19 10:18:27 +01:00
debug-client Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
device-key Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
docs Purge remaining Codex skill residue 2026-05-14 04:55:17 +01:00
exec Add Epiphany pressure reflection 2026-04-26 04:24:55 +01:00
exec-server Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
execpolicy Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
execpolicy-legacy Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
features Purge remaining Codex skill residue 2026-05-14 04:55:17 +01:00
feedback Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
file-search Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
git-utils Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
hooks Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
install-context Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
keyring-store Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
linux-sandbox Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
lmstudio Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
login Remove app-server auth leak from OpenAI spine 2026-05-13 07:23:32 +01:00
mcp-server Remove Codex skill list route 2026-05-14 01:06:17 +01:00
model-provider Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
model-provider-info Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
models-manager Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
network-proxy Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
ollama Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
otel Remove Codex skill config residue 2026-05-14 03:20:50 +01:00
process-hardening Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
protocol Move prompt renderer to state model 2026-05-19 09:40:48 +01:00
realtime-webrtc Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
response-debug-context Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
responses-api-proxy Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
rmcp-client Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
rollout Remove Codex skill list route 2026-05-14 01:06:17 +01:00
rollout-trace Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
sandboxing Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
scripts Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
secrets Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
shell-command Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
shell-escalation Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
state Amputate Codex agent job tooling 2026-05-06 12:50:02 +01:00
stdio-to-uds Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
terminal-detection Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
test-binary-support Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
thread-store Test remote thread store path boundary 2026-05-17 23:49:03 +01:00
tools Remove Codex Apps prompt residue 2026-05-14 05:15:08 +01:00
tui Purge Codex product label residue 2026-05-14 05:57:11 +01:00
uds Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
utils Purge Codex product label residue 2026-05-14 05:57:11 +01:00
v8-poc Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
vendor Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
windows-sandbox-rs Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
.gitignore Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
BUILD.bazel Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
Cargo.lock Seal coordinator step artifacts 2026-05-30 23:35:19 +01:00
Cargo.toml Delete Codex core skills crate 2026-05-14 02:28:00 +01:00
clippy.toml Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
config.md Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
default.nix Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
deny.toml Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
node-version.txt Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
README.md Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
rust-toolchain.toml Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00
rustfmt.toml Vendor Codex and land Phase 1 Epiphany state slice 2026-04-23 23:20:16 +01:00

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

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.