Loop protocol
One root, a board and parallel lanes
A loop is one long-lived agent session, the root, working a Backlog board through parallel lanes. It starts from a short frozen charter, gives each task to a lane in its own git worktree, lands what passes a composed gate, and stops only when it has written a closeout the next loop starts from.
This section is how I build software with agents, written so a teammate can copy it. Start with the four pages below in order: the tools, the setup, how a change is proven and a week of real runs. The protocol pages are the text every root and lane follows, and the articles cover why it's built this way.
- Protocol
- Loop v3
- Plugin
- agent-workflows
- Runs on
- Claude Code, pi, Codex
Start here
- 01
What I run and why: the harness and plugin, the board, the task surface, the gates, three reviewers, code search, docs lookup, the transcript catalogue and the rules.
- 02
Prerequisites, the six steps to a first loop on Claude Code, a first week that builds trust in it, and the habits I keep outside a loop.
- 03
The chain every change passes before it lands: the lane's gate, CodeRabbit, a DeepSeek Flash reviewer, an Opus reviewer when it matters, and one composed gate before the push.
- 04
Four Claude Code loops on one repository, measured from the transcript catalogue: what landed, what parked, what the reviewers caught and what changed between runs.
The protocol
- Protocol
- Harness
- Harness
- Harness
- Template
- Template
Why it's built this way
The protocol
- Article
How I run long agent loops on pi, Codex and Claude Code: a short frozen charter, a living queue from the board, lanes that hand back uncommitted candidates and a root that alone pushes.
- Article
The small tools that keep a long agent loop honest: a linter for the charter and queue, Stop hooks, a watchdog, a reconcile step, a verifier, the pi extensions and a closeout audit.
The pieces around it
- Article
Setting up Backlog.md for agents
How I set up Backlog.md boards for coding agents: the settings that can't change later, the config I hand-edit, the CLI flags that destroy another session's writes, and upstream's traps.
- Article
The global rules every Claude Code and Codex session starts with: how they are written, what stays out of them, what the main ones say and how they reach this site.
- Article
Building an agent-transcript indexer
How agent-history loads Claude Code, Codex and pi transcripts into one ParadeDB catalogue, what it can answer, where it stops, and the smallest version you could build yourself.
- Article
TypeSafe's Jev answers typed questions with probabilities instead of writing text. Where it earned a place in my agent setup, what the evaluations showed, and the gateway route that never worked.
Other harnesses
- Article
Why I don't use Codex for long-running agent loops
A Codex loop root can re-read its cached context every few seconds instead of every 19 minutes. pi is my default for OpenAI-model loops; the historical comparison explains why.
- Article
Bounding a model request on pi
A reasoning model that streams for an hour isn't an error, so nothing in pi stops it. How loop-pi bounds each request by inactivity and total time, and what happens once one fails.
Background
- Article
One agent context is not enough
Why I run Claude Code, Codex and pi as separate homes in each of two contexts, and publish their rules, hooks and settings from one source repository.
- Article
The hot and cold conversation archive
How my agent conversations move from each home into a 90-day hot tier and a permanent cold tier, and why message text never reaches a metric.