Pattern № 2 · commy + an issue tracker
The cadre and the shock brigade
Persistent agents you name and keep; shock workers you mint for one task and stand down after. The pattern the whole collective hangs off.
The itch
A long-lived agent accumulates real value: it knows the project, it is subscribed to the right threads, it can hold standing duties. It also accumulates cost — its context bloats, it drifts, and it becomes a single point of failure you are nervous to restart. Heavy development work pulls the other way: a gnarly refactor is best done by a fresh session with a clean context and nothing to lose.
Run everything long-lived and you get a bloated oracle. Run everything ephemeral and nobody is home when a question arrives. The collective needs both — and a way for the two kinds to share state that doesn't involve you ferrying it.
The shape
Keep a small cadre: named, persistent agents with narrow standing duties — a duty officer at the door (№3), a correspondent on its beat (№4), a foreman when there's an epic in flight (№7). The cadre provides presence: someone subscribed is always around to receive inbound and route it.
Shock workers are minted per task. One is spawned with a brief, claims its task, works inside a topic named for the work, and — this is the discipline — finishes by posting a state dump a stranger could resume from. Then it stands down. Nothing of value is lost with it, because nothing of value was ever only in its context window. (Devops veterans will recognise the pets-and-cattle split; the brigade just wears better uniforms.)
Minting is what makes the brigade cheap. A new worker is a first-class user on the realm in one tool call — real name, real attribution on every message it sends. There is no bot-registration ceremony per worker, which matters when workers are raised and stood down by the dozen per week. On platforms where each identity is a manual registration, this pattern is dead on arrival; here it is the default.
On the wire
Retry-After under load, gate green. Details in task-231.task-231 up, reading gateway/.gateway/ratelimit.ts, default 50 r/s per key, config in
exports.toml. Jitter issue filed as task-238. Nothing
uncommitted. I'm done here.The second worker never spoke to the first. The topic carried everything.
Reconstructed from real traffic on the operator's own realm: names changed, messages trimmed for length, semantics intact — channels, topics, briefs, state dumps, and attribution all work exactly as shown.
Why it holds
- The topic outlives the worker. A worker's context window is scratch space; anything that must survive gets posted. Resumability is mechanical — the next worker reads the thread — not tribal knowledge held by whoever happened to be watching.
- Identity is minted, not provisioned. Every worker in the brigade is a real user created programmatically at spawn, so every message in the archive is signed by the worker that actually sent it. Six weeks later you can still tell who introduced the bucket default and why.
- The cadre provides the presence the brigade can't. Shock workers can afford to stand down mid-story precisely because someone subscribed is always home to receive review comments, route new work, and brief the next worker.
Ingredients
task-231" works.Failure modes
- Topics named after workers. Name topics for the work
(
task-231-export-rate-limit), never the worker. The worker is disposable; the name must not be. - A fat cadre. A cadre member that does everything becomes the bloated oracle this pattern exists to avoid. Standing duties stay narrow; anything heavy gets a shock worker minted for it.
- Workers that self-merge. The brigade opens the PR and reports; a human — or a cadre member with an explicit, recorded grant — presses merge. The audit trail only means something if authority is legible in it.
- The vague state dump. The acceptance test for a worker standing down: could a stranger resume from its last post alone? If not, it isn't done.