Skip to content

Lanes and the run ledger

Agent changes get no special treatment. Each one runs in its own checkout and is reviewed before it merges.

Status: in daily use · checked Oct 29, 2026

In plain terms

I route work through five kinds of lane, record it in a run ledger, and merge only after checks and, in the main repositories, an independent review. Delegation has hard limits, so a runaway agent stops before it runs up a bill.

One human sets direction. A coordinator agent session triages what arrives, decides which lane fits, dispatches workers and verifies their results. Workers do bounded pieces of work in isolation. Each worker's output is tracked, gated, and, in the main repositories, reviewed by a different agent before it merges (see How agent output is trusted).

Every lane runs through one dispatcher: a Redis-brokered queue that places each job on the right agent, account and machine, within each account's limits.

flowchart TD O[Operator] --> K[Coordinator] K --> C[Isolated worker] K --> S[Read-only investigator] K --> P[Multi-step plan] C --> L[(Run ledger)] P --> L C --> PR[Pull request] PR --> G[Required checks] G --> R[Independent reviewer]:::guard R --> M[Merge]
flowchart TD O[Operator] --> K[Coordinator] K --> W[Isolated worker,
read-only investigator
or multi-step plan] W -.-> L[(Run ledger)] W --> PR[Pull request] --> G[Required checks] --> R[Independent reviewer]:::guard --> M[Merge]

The five lanes

Lane Contract Why it exists
Isolated worker (courier) a full-write worker in its own git worktree; tracked in the ledger; reports completion through an inbox bounded implementation work that must be isolated, attributable and resumable
Follow-up on a finished worker (phone line) resume a finished courier on the same ledger row follow-ups keep their context and their audit trail
Read-only investigator (scout) untracked, read-only investigation on the cheapest capable model tier "where is X, how is Y wired" questions are the bulk of agent traffic and need no write access
One approved command, no model (remote argv) one allowlisted command on a remote host through a signed envelope; no model in the loop deterministic operations should not pay for, or risk, an LLM
Multi-step plan (orchestrate) a multi-lane plan with a dependency graph, gates between phases and per-lane owned paths (how it works) parallel work without lanes editing the same files

The run ledger is the system of record

Each dispatched run is a row in a relational store: who launched it, in which worktree, what state it is in, and when it last made progress. The coordinator, the timers and the dashboards all read the ledger, and nobody takes an agent's word about its own run.

"Done" means the worker's own result. A row moves to done only when the worker's own terminal result event is in its log. An exit code never decides it, because a process can exit cleanly after doing nothing, or be killed after it finished. The ledger makes the failure classes that agent workers actually produce visible: wedged (process alive, no progress), false-done (reported success, nothing landed) and hollow-done (exited cleanly with an empty result). A few small timers keep the ledger accurate: they reap rows whose process is gone, sample health and mark stalls. A triage procedure classifies a suspect row before anyone retries it. How often each outcome happens is on measuring agent reliability, and what a row and a brief look like is on what a run leaves behind.

Scouts have no row, by design. Interactive sessions and scouts, the read-only lookups I run through the scout command, aren't recorded. A scout can't change anything, so it has nothing to account for, and keeping it off the ledger is what keeps investigation cheap. A read-only job I dispatch as a worker, such as a review, is a normal run and does get a row.

Delegation is bounded

A worker can hand part of its job to child workers, but only inside limits that the ledger enforces at the moment a child row is created: how deep a tree of delegation may go, how many children and agents it may hold, and a cost cap for the whole tree. A request that would break any of them is refused with a coded reason instead of being allowed. The exact limits stay private.

From branch to merge

  1. The worker commits in its own worktree; the shared checkout is off limits.
  2. Pushing is a two-step gate: the first call prints a checklist and a one-time confirmation, and only a second call carrying that confirmation pushes.
  3. Required checks run on the pull request: the test suites, the documentation checks and the leak scans.
  4. In the main repositories, an independent reviewer (a separate AI agent) must pass the change before it can merge. The author doesn't post that decision, and the pull request can't merge without it.

How cost is routed

  • The default worker for a planned task is the cheapest tier that can do it; a heavier reasoning tier or a frontier model needs a stated reason.
  • Read-heavy fan-out is meant to avoid expensive subagents. A hook denies spawning one and points at the scout lane instead.
  • Cost is a design input. When a pipeline turned out to burn far more than expected, the bulk work moved to the cheap tier and the expensive agents were kept for orchestration and review; the story is in How I run AI coding agents.

The tiers, the routes that can't be reached and what is bounded are on routing agent work by cost.

Coordination

Sessions address each other by role rather than by connection detail. If a message can't be delivered live it falls back to a durable inbox. Roles mark which duties a session has: coordinator, fixer, or checker.

What this buys, and what it costs

It buys parallelism with attribution, cheap reads, and the independent reviewer's decision on every merge into the main repositories. It costs a lot of scaffolding: the lanes, the ledger, the gates and the hooks in Guard rails exist because each one answered a real failure. The incidents are in Incidents and the fixes they produced.