GitHub - adam-s/lanes: Warm Claude Code sessions coordinating through one append-only file — parallel agent lanes on a shared repo

GitHub

2 min read Original article ↗

A Claude Code chat will keep a file watch running (like tail -f) if you ask, and wake up when a new line arrives. So several chats watching the same file can send messages to each other.

Cache reads cost 0.1x (10%) of the normal token price. A chat that has already read the code is cheap to wake up again. Subagents start with an empty cache every time, so launching them over and over is expensive, even for small tasks.

This proof of concept combines the two ideas into agent lanes. Each chat joins a shared message file with the comms skill. One chat is the orchestrator, the rest are workers. You can also give workers a specialty, like reviewer or UI.

lanes-demo-edit-v1-fast-web.mp4

Setup

  1. Open three Claude Code chats in this repo.
  2. In the first, type /comms main.
  3. In the second, /comms child claude-1. In the third, /comms child claude-2.
  4. Tell main what to build. It splits the work into tasks, sends them out, verifies the results, and sends the next ones.

If two workers write code at the same time, give each its own git worktree.

Codex can join a lane too (for example /comms child codex-1), but you have to explicitly tell it not to close the chat, or it ends the session instead of watching the file.

How a task flows

How a task flows: main appends a task to channel.jsonl, the worker wakes, does the work in its own worktree, replies done with evidence, main verifies the claim and sends the next task

In the file, the task and done above are one line each. Shown here pretty-printed:

{
  "from": "main",
  "to": "worker",
  "at": "2026-09-01T01:28:13Z",
  "type": "task",
  "task": "usage-dashboard",
  "text": "Build the dashboard view. Your tree: ../lanes-dashboard."
}
{
  "from": "worker",
  "to": "main",
  "at": "2026-09-01T01:32:42Z",
  "type": "done",
  "task": "usage-dashboard",
  "text": "Committed 724d2d6. Ran node --test: 27 pass, 0 fail."
}

The rules the agents follow are in AGENTS.md. Why each rule exists is in .agents/reference/protocol.md.

Token prices

Anthropic token rate card — cache reads cost 0.1x the input price