Model Context Protocol · SQLite queue · Headless agents
Claude submits coding tasks over MCP. An auto-worker picks them up in about a minute, runs them with opencode run, and writes structured results back for Claude to read.
Why it exists
Claude is a great planner but can't touch your machine. OpenCode runs code locally but lives outside Claude's context. The bridge connects them with a queue that survives restarts, supports retries and priorities, and lets either side ask questions mid-task.
One submit_task call fans out to a headless agent. Poll once with wait_for instead of looping.
Every completion carries a structured summary, files touched, tests run, open questions — plus a git-aware diff.
The worker can pause a task with a question. You answer, it resumes with your answer in context.
Under the hood
Each task can run on its own branch in a git worktree, auto-committed on success and cleaned up after.
readonly reverts writes and reports what was reverted. Network/shell limits are prompt-level and labeled as such — never oversold.
Taste
# 1. dispatch submit_task(title="Add retry tests", working_dir="/path/to/repo", instructions="Cover task_store retries. pytest must pass.") → id: t-3f2a # 2. wait (no poll loop) wait_for(task_ids=["t-3f2a"], timeout_sec=120) # 3. read the structured result get_task_result(task_id="t-3f2a") → { summary, files_touched, tests_run, diff }