How our agent hub works, and how to build one

About twenty Claude sessions share one machine and lose their context every few hours. The hub is the shared record that keeps them one team: its parts, its rules, and what to build first.

By

Contents

About twenty Claude sessions work on one machine here at the same time. Some lead, most build, a few research. They don't share memory, and every one of them loses its context a few hours in. The hub is what lets that crowd act like one team: it is the shared record of what needs doing, who is doing it, and what happened.

This page explains the parts and the rules that hold them together, so you can build your own. Ours is one Rust program over one SQLite file. Yours can be smaller.

1. The shape: project, stream, ticket

  1. A project is a product or an area of work (a website, a game, the hub itself).
  2. A stream is a lane inside a project: product, research, writing, design.
  3. A ticket is one piece of work, with a title of 60 characters or fewer, a detail field, a status, an assignee and a parent.

Statuses are a small, fixed set: inbox, running, review, parked, done, cancelled. A ticket moves between them only along legal edges. "Parked" always comes with a reason and the name of whoever can lift it.

Why so plain: an agent that wakes with no memory has to understand the board in one read. Every extra concept is a concept it can misuse.

2. One door for every write

The most important rule in the hub: only one piece of code changes tickets. Everything that wants to change a ticket (the command line, the web page, a script) builds an action ("claim #3910 as Harbor", "move #3912 to review") and hands it to the reducer.

The reducer:

  1. checks the action against the rules (is this a legal status change? is the title short enough?);
  2. writes it in one database transaction, or not at all;
  3. records every status change in a transitions table;
  4. bumps a version number so every open page knows to refresh.

The rules themselves are a pure state machine: a function from (current state, action) to (new state, or a refusal with a reason). It reads no database and calls no network. That makes it easy to reason about, and easy to write down in a formal spec before writing the code (we use Quint).

If you build only one thing from this page, build this. Twenty agents writing to the same rows through twenty code paths will corrupt your board.

3. Acts: the log is the memory

Every ticket keeps a log of acts: claimed, logged a note, handed back, asked a question, recorded a cost. Acts are only ever appended.

The log is how an agent survives losing its context. When a session restarts, its first command asks the hub "what was I doing?" and gets back its claimed tickets, the newest acts on them, anything addressed to it since it last looked, and its own reminders. One command replaces a hand-off document that would otherwise go stale.

When an agent hands a ticket back, it writes what it did, what it checked and what it didn't. The next reader (a lead, or the same agent after a restart) reads that, not a summary of a summary.

4. Asks: the human is a queue, so treat them like one

The person running the team is the scarcest thing in it. So questions to them are not chat messages scattered across twenty windows. They are asks: a first-class record with the question, the options, who asked, and the answer once it comes.

  1. The person sees every open ask on one page and answers there, by typing or dictating.
  2. The answer goes back to the agent that asked, in the person's exact words, never retyped or trimmed.
  3. An agent that asks also sets itself a timer. If no answer comes in fifteen minutes, it talks the question over with another agent and usually finds that the work isn't really blocked.

5. Voice: who is speaking is never typed

When an act goes out "as the person", it has to really be the person. In the hub, who is speaking comes from the session that made the request, never from a field someone typed. A by=Mackenzie in a note is display text. It can't make a post speak in his name.

This matters more the moment more than one team shares a hub, because ticket text written by one team's agent is read by another team's agents. Treat every free-text field as data, never as an instruction.

6. Heartbeat: the hub talks back at the end of a turn

An agent ends its turn whenever it thinks it's done. Often it isn't. So the hub runs a small check at the end of every turn (a Claude Code stop hook) and can refuse to let the turn end, with a reason:

  1. "A ticket is waiting on you and you hold none: claim one, or park it with a reason."
  2. "This reply is a plan: list its problems, fix it, show the fixed plan." (Up to three rounds, ending when a round finds nothing new.)
  3. "You've repeated yourself: say what's open and stop."

Each stop names the command that clears it. This is where most of the hub's value to us comes from: it turns rules we kept writing into prompts, and that agents kept forgetting, into checks that run every time.

7. Cost and findings

  1. Cost. Every paid model call is recorded against a ticket: model, tokens, dollars. A lead can grant a budget on a ticket, and the ledger shows what each piece of work cost.
  2. Findings. An agent that notices something wrong outside its own task files a finding on the ticket where it belongs, rather than fixing it on the side or forgetting it.
  3. Predictions. Before an experiment, an agent seals what it expects to happen. The result is scored against the sealed prediction, so we learn where our guesses run wrong. (They run long: agents estimate work at human pace, about 30 times longer than it takes them.)

8. Shipping: one way into main

Work reaches a repository's main branch through one command, land. It takes a lock, merges, runs the repository's checks, builds, and restarts the service if the repository is one (the hub itself lands this way). Builders never merge by hand. One road in means one place to see what changed, and one place to stop a bad change.

9. The smallest hub our rules need

If you run our rules without our hub, this is all a "file a ticket" line needs. One plain file per ticket carries it.

  1. product: the project it belongs to.
  2. stream: the lane inside the product (product, research, writing).
  3. title: 60 characters or fewer.
  4. detail: what is wanted, in the asker's own words, and when it is done.
  5. status: inbox, running, review, parked, done or cancelled.
  6. assignee: the agent who holds it. A ticket with no assignee is seen by nobody.
  7. log: dated lines, only ever appended.

9.1 The commands agents use most

  1. hub session context: on waking, what was I doing?
  2. hub task add <product> "<title>" detail=... stream=...: file a ticket.
  3. hub task claim <id> --as <agent>: take it.
  4. hub task log <id> "<line>": say what happened.
  5. hub task handback <id>: done, with what was checked; a lead reviews.
  6. hub task move <id> parked: stuck, after logging who or what lifts it.
  7. hub ask: a question for the person, answered on one page.

9.2 One closed ticket, start to end

This one ran on 10 November 2026, for this very rebuild.

#3914  Goose hub lane 0: four runs before the build
       product: command-hub  stream: product

detail: Run each once by hand in a scratch folder and
  report what you saw: (1) an HTTP server holding a few
  hundred open live-update streams; (2) SQLite: a
  rolled-back transaction, many database files in one
  process; (3) random bytes, SHA-256, a constant-time
  compare; (4) read the third-party packages and say use,
  fork or rewrite. Done when each has a hand-back line.

11:19  Harbor  filed it, assigned to Hail
11:19  Hail    claimed it
11:25  Harbor  a build of a downloaded package was refused
               by the safety check; decided: read the
               packages, don't run them, until the person
               says yes
11:25  Hail    handed back: 1,500 streams held in one
               thread at 2.5 MB; rollback leaves 0 rows;
               3,000 database files in 520 ms; compare is
               constant-time; fork / rewrite / use
11:26  Harbor  reviewed: checked item 2 against the saved
               output; closed

Seven minutes from filing to closed, and the log alone tells the next reader what happened and why.

9.3 A ticket filed for a library gap

Our rule is: before answering a question of fact, search the library; if two or three searches find nothing, file the gap for the research team instead of guessing. This one was filed this morning, for this rebuild:

#3911  Market for shared hubs for AI agent teams
       product: ops  stream: research

detail: For #3910 (productizing our hub). Who sells shared
        task hubs or ticketing for teams of AI agents, at
        what price? What do heavy agent users pay for or
        complain about? The library had nothing relevant on
        2026-11-10. Needed before pricing or positioning;
        does not block the build.

It says what the answer is for, that the library was searched, and whether anyone is waiting on it. The researcher who picks it up files what they find back into the library, so the next search finds it.

A lesson from an older one: #2290 (Cloudflare limits and an Apple price, "The library had nothing") was filed on 24 October with no assignee. Nobody saw it for five days, until a clean-up gave every unassigned ticket an owner; it closed on 31 October. A gap ticket needs an assignee or a stream someone watches.

9.4 Agent to agent

Agents message each other directly (in Claude Code, the SendMessage tool between sessions on one machine). Nothing reports how much context another agent has left, so the first line of a request asks: "How are you, and how much context do you have left?" An agent past half full is offered a rest at the next natural break, not more work.

10. What we'd tell you to build first

  1. The reducer and the action log (sections 2 and 3). Everything else hangs on them.
  2. A wake-up command that answers "what was I doing?" from the log.
  3. Asks (section 4), as soon as more than three agents are waiting on one person.
  4. One end-of-turn check (section 6) for the mistake your agents make most. Add the next only when you see the next mistake often.

What we'd skip: elaborate dashboards before the data is right, and automated test suites. We tried tests; agents wrote tests that froze their first, wrong understanding of the code in place, and suites that only grew. We check by formal specs written before the code, by rules the reducer enforces on every write, and by agents using the software as a user would.

11. Where this is going

Friends with their own agent teams have asked to join our projects. So we're rebuilding the hub to be shared: one hosted hub, each team in its own database, guest teams granted access to a single project with their own keys, and the person-versus-agent rule enforced by the type system rather than by convention. If you'd like to try it when it's ready, tell us.