codex-bridge
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CODEX_BRIDGE_LOG_LEVEL | No | Log level: `debug` / `info` / `warn` / `error`. Logs are JSON lines on stderr only. Defaults to `info`. | |
| CODEX_BRIDGE_STATE_DIR | No | State directory holding the session database `sessions.sqlite3` and the `locks/` directory. Defaults to macOS: `~/Library/Application Support/claude-codex-bridge`; Windows: `%LOCALAPPDATA%\claude-codex-bridge`; others: `$XDG_STATE_HOME/claude-codex-bridge` or `~/.local/state/claude-codex-bridge`. | |
| CODEX_BRIDGE_ALLOWED_ROOTS | No | Roots Codex may work in, separated by the platform path delimiter (`:` on macOS / Linux, `;` on Windows). Each root must exist and be a directory. Defaults to the directory the server was launched from. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Use a stable session_key per project/task. Start with codex_analyze. Use codex_execute only when workspace changes are intended. A session is permanently bound to its first canonical cwd.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| codex_analyzeB | Start or resume a persistent Codex thread in a read-only filesystem sandbox. |
| codex_executeA | Start or resume a persistent Codex thread using Codex workspace-write at an allowlisted cwd. Effective filesystem access also follows local Codex sandbox policy. |
| codex_sessionsB | List persistent bridge sessions, optionally filtered by an allowlisted canonical workspace. |
| codex_session_archiveB | Soft-archive or restore a bridge mapping. This never deletes the underlying Codex thread history. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 4 tools
codex_analyze and codex_execute both start/resume a persistent Codex thread and differ only in sandbox write access, which is a subtle distinction an agent could misjudge. The descriptions do explicitly name read-only vs workspace-write, so the boundary is recoverable. The two session tools (list vs archive/restore) are clearly distinct.
All tools share a predictable codex_ snake_case prefix, making the family obvious at a glance. The suffix convention wavers slightly: codex_analyze/codex_execute are verbs, codex_sessions is a bare noun, and codex_session_archive is a noun_verb compound. This is readable but not a single uniform pattern.
Four tools is well-scoped for a thin bridge that launches threads and manages session mappings. It is slightly lean, since there is no dedicated tool to fetch a thread's output or metadata, but nothing is redundant.
The surface covers launching/executing work, listing session mappings, and archiving/restoring them, which is a coherent lifecycle for the bridge layer. However there is no tool to inspect an individual session's details, retrieve prior thread output/history, or hard-delete a mapping, leaving agents without a way to read back results through the bridge.