Skip to main content
The Claude Code runtime (claude-code) lets you run Anthropic’s Claude Code agent on your Clawboo team. Clawboo installs the Claude Code CLI, spawns it per task in an isolated git worktree, and reports results to the shared board. You get a 200,000-token context window, live streaming output, and real USD cost reporting for every run. This is the runtime to reach for when you need deep, multi-file coding work with Anthropic’s models. Each agent works in its own worktree, can resume prior sessions, and attaches Clawboo’s Tasks, Memory, Tools, and TeamChat MCP servers automatically.

Capabilities

CapabilityValue
Streaming (live text deltas)
MCP (Clawboo’s tool servers)
Worktrees (isolated git workspace)
Resume (continue a prior session)
Tool approval gates
Context window200,000 tokens
Persistent home across runs
Claude Code is stateless between runs — the cognition lives in the model, not in a durable per-identity home on disk. If you need an agent that compounds memory and skills across dispatches, see Hermes.

Prerequisites

  • Node.js 22+ and npm (bundled with Node).
  • An Anthropic API key. Alternatively, if you already have the claude CLI logged in on your machine, the SDK can fall back to that auth.

Connect from the Runtimes panel

1

Install the Claude Code CLI

In the Runtimes panel, click Install on the Claude Code card. Clawboo streams the install progress in a terminal box:
npm install -g @anthropic-ai/claude-code@2
The package is pinned to the current major version so a future breaking release is never auto-installed. The health binary Clawboo checks for is claude.
If the install reports a permission error (EACCES), prefer a Node version manager (nvm or fnm) or Homebrew over running the command with sudo.
2

Connect your Anthropic API key

Once installed, the card moves to Needs auth. Click Connect and paste your Anthropic API key. Clawboo stores it in the encrypted vault under ANTHROPIC_API_KEY and the card flips to Ready.
curl -X POST http://localhost:18790/api/runtimes/claude-code/connect \
  -H 'Content-Type: application/json' \
  -d '{"apiKey":"sk-ant-..."}'
If ANTHROPIC_API_KEY is already set in your environment or present in ~/.openclaw/.env, the card reads Ready automatically — you do not need to paste the key again.
3

Run a board task

With the runtime ready, dispatch a board task. Clawboo claims the task, provisions a worktree from your repo, spawns the Claude Agent SDK with your key injected, and streams results back to the board.
curl -X POST http://localhost:18790/api/runtimes/claude-code/run \
  -H 'Content-Type: application/json' \
  -d '{"taskId":"<task-uuid>","repoPath":"/path/to/repo","kind":"code"}'

Session resume

After each run, Clawboo captures the native Claude session ID. On a subsequent run of the same task by the same runtime, Clawboo passes that session ID back to the Claude Agent SDK — producing a genuine continuation of the prior session, not just a prose summary. Cross-runtime continuity (resuming on a different runtime) uses the AGENT_HANDOFF.json prose handoff instead.

Context window and session rotation

Claude Code’s 200,000-token context window drives Clawboo’s proactive session-rotation watermark. As a run approaches the limit, Clawboo can spin up a fresh successor session carrying a handoff note and continue the task — rather than failing when the window fills. When a run hits its turn ceiling, Clawboo treats this as a clean rotation signal, not an error.

Real USD cost reporting

Claude Code reports actual total_cost_usd per run. Clawboo passes this straight through as a concrete costUsd on cost and done events — not an estimate. This means the budget kill-switch can enforce dollar caps on Claude Code runs.

Verify it worked

After connecting, GET /api/runtimes should show claude-code with connectionState: "ready" and health.ok: true. After running a task, check that the task advanced on the board, the worktree contains file changes and an AGENT_HANDOFF.json, and a report-up summary appears as a board comment.

Troubleshooting

The run starts but authentication fails. Without a key in Clawboo’s vault, the SDK falls back to your local claude CLI auth under your home directory. If Clawboo runs in a sandboxed environment with an isolated HOME, that login is invisible. Set ANTHROPIC_API_KEY via the vault (or your environment) for deterministic auth.
Tasks keep hitting the turn limit. A max_turns terminal is clean, not an error. Clawboo rotates to a fresh session and continues. If the chain exhausts maxRotations without finishing, the task is released back to todo. Increase maxRotations on the run body for longer tasks.
POST /api/runtimes/claude-code/run returns 409. Another worker claimed the task first. A 409 is data, not a transient error — do not retry it automatically. Check the board for the current task state.

See also