Backends
The adapter's internal Codex protocol layer talks to a small ClaudeRuntime interface, so non-SDK Claude Code bridges can be selected without removing the default Agent SDK route.
| Backend | Status | Streaming | Approvals / diffs |
|---|---|---|---|
agent-sdk-sidecar (default) | Stable | Full (text, reasoning, tools) | Yes |
agent-http / Channels | Experimental | Message-level deltas | No |
agentapi | Experimental | Terminal-derived text | No |
claude-p | Experimental | None (one-shot) | No |
codex (native passthrough) | Stable | Native Codex | Native Codex |
Switching routes
Install the host helper next to the shim:
install -m 0755 scripts/claude-codex-mode ~/.local/bin/claude-codex-modeIt rewrites ~/.claude-codex/runtime.env, prepares the matching bridge daemon (agent-http / agentapi), stops the current app-server so Codex App reconnects into the new route, and provides readback commands:
claude-codex-mode list # selectable modes; current marked *
claude-codex-mode set agent-http opus # switch route, restart bridge with Opus
claude-codex-mode model opus # keep route; update default/bridge model
claude-codex-mode status # mode, bridge health, recent logs
claude-codex-mode logs adapter|agent-http|agentapiModel switching
Model switching is exact per turn for the SDK runtime and claude-p (the adapter passes model directly). For agent-http / agentapi the bridge talks to a long-lived Claude Code session, so changing the model means restarting that bridge (claude-codex-mode model <alias>).
Native codex passthrough
In CLAUDE_CODEX_RUNTIME_TYPE=codex the shim launches the real Codex app-server, so the adapter is not in the process and cannot switch back from in-App controls. Use claude-codex-mode set codex / set agent-sdk-sidecar on the host and reconnect.
agent-http / Channels
Loads the bridge from $CLAUDE_CODEX_AGENT_HTTP_DIR (or ~/agent-http) but launches Claude Code from the thread cwd. Uses POST /message, GET /messages, GET /status, GET /events; streams message-level deltas only (no semantic tool / thinking / permission events).
claude-codex-mode set agent-http opusagentapi
Runs agentapi server --type=claude from the thread cwd and maps final agent text into Codex messages. No rich approval / file-change events (terminal-derived text only). Run claude-codex-mode trust if Claude's workspace-trust prompt appears.
claude-codex-mode set agentapi opusclaude-p
Runs claude-p --output-format json --input-file ... per turn and emits the final assistant text. Not streaming, no turn/steer; defaults to one-shot turns (some claude-p builds replay results when combining --resume with --input-file).
export CLAUDE_CODEX_RUNTIME_TYPE="claude-p"
export CLAUDE_CODEX_CLAUDE_P_COMMAND="claude-p"
# export CLAUDE_CODEX_CLAUDE_P_RESUME=1 # only after verifying --resume + --input-file