skip to content
ksegit
LON --:--:--

ClaudeOrchestrator

Orchestration platform for Claude Code CLI - state-machine execution, checkpoint recovery, MCP routing and a real-time web control panel.

typescript · node · sqlite · websockets · mcp

Problem

Long AI coding tasks die ugly: rate limits, token quota exhaustion, crashed CLI sessions - and the work in flight dies with them. Running Claude Code unattended over hours needs process supervision, resumability and observability that a bare CLI doesn't provide.

Approach

A TypeScript platform that wraps the Claude Code CLI in a supervisor: large tasks are chunked automatically, progress is checkpointed with compression, and execution runs through a seven-state lifecycle so every failure mode has a defined transition instead of a stack trace.

 task ──► chunker ──► state machine (7 states)
                          │
                    CLI supervisor ──► Claude Code CLI
                          │  output parser (rate-limit,
                          │  quota, error patterns)
                    checkpoints ──► SQLite (ACID)
                          │
              web panel (WebSocket events) · MCP router

An output parser watches the CLI stream for rate-limit and quota patterns and drives recovery; an MCP router manages Model Context Protocol servers; a skill engine auto-discovers pluggable extensions; a web dashboard follows everything over WebSockets.

Tradeoffs

  • Wrapping a CLI, not an API. Supervising the real tool preserves exact behavior (hooks, config, tools) at the cost of parsing human-oriented output - pattern detection instead of typed responses.
  • SQLite over a server DB. Single-node orchestration wants ACID and zero ops, not connection pools.
  • Checkpoint granularity. Frequent checkpoints buy cheap recovery and cost I/O; compression keeps the state store small.

Outcome

An MIT-licensed platform with state-machine execution, checkpoint recovery and a live dashboard - built before resumable long-running sessions were table stakes in the tooling itself.