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 |
Only the SDK route gets a message's context (injected items, a picked skill's SKILL.md, the App's additionalContext) in blocks of its own. agent-http, agentapi and claude-p get one flat text with the context ahead of the message, so a Claude Code command (/name args) sent with any context does not run there; see Skills and the App's tools.
Web search off (Settings > Configuration, or CLAUDE_CODEX_WEBSEARCH=0 with no mode saved there) takes Claude Code's WebSearch tool away on the SDK route and claude-p, which gets the tools a thread must not have as --disallowedTools. agent-http and agentapi run Claude outside the adapter, so Claude keeps WebSearch there whatever the web search setting says, as Claude Code's own setting decides memories there.
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