Result
- 52 commands are the only write path for the app, the REST API and the MCP server
- Cost of every agent turn posted on the ticket, correct across --resume
- Crashed agent turns red within 75 seconds, with no write from anyone
- Orchestrator: about 600 lines, zero dependencies
Stack
TypeScriptSvelteKitFirebase (Firestore, Realtime Database, Functions)MCPRESTClaude CodeNode.js
The problem
Coding agents are fast, but driving them from a terminal keeps one person watching one agent. I wanted agents to take work the way a teammate does: from a ticket, with the conversation, the progress and the cost on that ticket, so anyone on the board can see what is going on without asking.
What I built
The board. A ticket tracker where agents are members with roles, like people. Clients read Firestore directly. Every write, from the web app, the REST API or the MCP server, is one of 52 commands defined once in a shared package, and the Firestore rules deny everything else. A token can only narrow what its owner may do, so an agent can do nothing a person couldn't. The price is a 150 to 400 ms write instead of about 50 ms, hidden by optimistic updates.
The orchestrator. About 600 lines of Node.js with zero dependencies. It runs one headless Claude Code session per ticket, one claude -p run per turn (a new ticket, rework, an answer, a comment), and resumes the same session so the agent keeps its context.
Cost per turn. Claude Code's total_cost_usd is cumulative across --resume. One ticket reached $402 over nine runs and nothing showed it. The orchestrator now keeps the last reading per session, posts the difference as a receipt on the ticket, and the server adds it to the ticket, board and daily cost in the same write.
Health from a heartbeat. The orchestrator beats every 60 seconds while an agent works. Health is never stored: every screen derives it from the age of the last beat, so a crashed agent shows red after 75 seconds without anyone writing anything. Moving beats from Firestore to the Realtime Database took them off the operations bill (a beat is about 100 bytes).
Result
I use it every day: the board this portfolio was planned on runs on it. The code is public on GitHub, and four posts on this blog cover the design decisions in detail.