claude-worker

v0.5.0 · MIT · powered by the official Anthropic Agent SDK

Claude Code sessions your app can embed, watch, and control

claude-worker runs a close-to-real Claude Code session via the Agent SDK and exposes it to your host app — a session server, a typed wire protocol, and embeddable panel components with approve/deny controls.

npx claude-worker

Gateway and dashboard on one port. Nothing to clone.

Close-to-real sessions

Sessions behave like Claude Code launched in the same directory: same skills, same CLAUDE.md, same MCP config surface, same permission system.

Human-in-the-loop permissions

Tool calls surface as approve/deny cards; the tool blocks until a client decides, with deny-on-timeout. Safe to point at a real checkout.

Typed wire protocol

One ordered stream of seq-numbered events plus a small command set. Versioned from day one — the protocol is the product boundary.

Embeddable panel components

A styled SessionPanel with streaming transcript, tool-call cards, and composer — or go headless with the hook and reducer.

Two engines, one protocol

Claude Code via the Agent SDK, or a model-agnostic engine over the AI SDK with capability-scoped tools in a QuickJS sandbox — same client, same panel, same queue.

Attach, replay, resume

Clients reconnect and replay from their last seen event; closed sessions resume from the SDK’s on-disk store with full history backfill.

Unattended job queue

Schedule one-shot runs with bounded concurrency, token budgets, retries, a wall-clock watchdog, and ordered webhook delivery.

Work that outlives the turn

A session can park on work nothing here is doing — a batch job, a human approving on Monday — and wake days later, mid-turn, as itself.