Skip to main content
Every Claude-mode task (type: "claude", the default) executes on one of two agent runtimes. Both are fully managed by the Agent API: they run inside the same sandbox, expose the same task lifecycle and event stream, and are interchangeable from your perspective. You normally pick a model, and the runtime follows.

The two runtimes

RuntimeSDKWire protocolUsed for
Claude Agent (default)@anthropic-ai/claude-agent-sdkAnthropic Messages (/v1/messages)Anthropic/Claude ids and every other provider (NVIDIA, MiniMax, xAI, Z.ai, …)
Codex Agent@openai/codex-sdkOpenAI Responses (/v1/responses)OpenAI / Codex ids
Both runtimes drive the same managed sandbox, the same GitHub clone/branch/commit flow, and emit the same event contract. Switching runtime requires no client changes — only a different model (or an explicit agent override).

Selection rule

When you omit agent, the runtime is inferred from the model id. A model runs on the Codex runtime when its id:
  • contains codex, or
  • contains openai/, or
  • contains /gpt- or starts with gpt-, or
  • starts with o1, o3, or o4
Every other id runs on the Claude runtime.
Example model idRuntime
blackboxai/openai/gpt-5.3-codexCodex
blackboxai/openai/gpt-5.5 (and gpt-5.4, gpt-5.4-pro, gpt-5.4-nano)Codex
blackboxai/openai/o3-miniCodex
blackboxai/anthropic/claude-opus-4.7 / claude-sonnet-4.5Claude
blackboxai/nvidia/nemotron-3-nano-30b-a3bClaude
blackboxai/minimax/minimax-m2.7Claude
everything elseClaude

Explicit override — the agent field

Pass agent on the request body to force a runtime regardless of the model id:
agent
string
"claude" or "codex". When set, overrides the runtime inferred from model. Omit to auto-select (default: claude). An invalid value returns 400 listing the supported agents.
  • agent: "codex" — run a non-OpenAI model on the Codex (Responses) runtime.
  • agent: "claude" — run an OpenAI-shaped id on the Claude (Messages) runtime.
The same agent field is accepted by POST /api/v1/tasks and POST /api/v1/benchmarks/runs.
ContinuationPOST /api/v1/tasks/:id/continue follows an inheritance rule: omit both model and agent to inherit the original run’s model and runtime; if you change model (or the runtime), you must pass agent explicitly. This lets a follow-up keep a codex+opus override intact, while making any runtime change explicit.

Event stream contract

Both runtimes emit the same event types over GET /api/v1/tasks/:id/logs/stream and GET /api/v1/agent/stream. Your stream-consuming code does not need to know which runtime produced the events.
Event typeMeaning
startRun started.
session-initSandbox/session initialized; carries session metadata.
text-start / text-delta / text-endAssistant text — streamed token deltas bracketed by start/end.
tool-call-startThe agent invoked a tool (e.g. Bash, Read, Write, or a Codex command_execution).
tool-input-availableFull tool input/arguments are available.
tool-output-availableTool finished; output/result is available.
delegate-to-sandboxThe orchestrator delegated work to the sandbox agent.
resultTerminal run result (success/failure + summary).
errorAn error occurred during the run.
finishStream finished.
Set includeDeltas=false on the log stream to drop text-delta events and receive only the structural events above.

Codex specifics

  • Wire protocol — the Codex runtime talks to the router’s OpenAI Responses API (/v1/responses). Codex models are configured mode: responses end-to-end.
  • Reasoning — pass reasoning.effort (minimal | low | medium | high) the same way you would on the Responses API; it is honored by the Codex runtime.
  • Tool use — Codex executes shell/file work via command_execution; these surface through the same tool-call-start / tool-output-available events as Claude’s tools.

Managed sandbox & SDKs

Both runtimes run inside the same managed Vercel sandbox. The SDKs are provisioned for you — you never install anything:
RuntimePackagePinned version
Claude@anthropic-ai/claude-agent-sdk (bundles claude-code)0.2.87 (claude-code 2.1.87)
Codex@openai/codex-sdk0.138.0

Examples

curl -X POST 'https://agent.blackbox.ai/api/v1/tasks' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "prompt": "Add a CONTRIBUTING.md with a setup section",
    "model": "blackboxai/anthropic/claude-sonnet-4.5",
    "repoUrl": "https://github.com/org/repo.git",
    "selectedBranch": "main"
  }'
The response shape (taskId, runId, chatId, …) and every downstream endpoint — status, logs, files, continue, cancel — are identical across runtimes.

Create a Task

Start a task; pass model and optional agent.

Models

Full model list with per-model runtime mapping.

Stream Task Logs

The shared SSE event stream for both runtimes.

Benchmarks

Run benchmarks on either runtime via the same agent field.