Skip to content
dylanpulverPublic

About

How to run Claude Code as a team of agents: session board, handoffs, state ledgers, config sync, and an overnight queue. Patterns run daily across 3+ parallel accounts.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

agent-ops

CI

How to run several Claude Code sessions at once without them stepping on each other.

The core piece is a session board: a hook that has every live session, across terminals and accounts, write one line to a shared file saying where it is and what it is doing. Before a session grabs batch work, it reads the board. Three sessions open, two of them in the same repo:

$ cat ~/.claude-sessions/board.jsonl
{"sid":"a1f3","cwd":"/home/me/code/api","cfg":".claude","seen":"2026-11-14 19:14","doing":"migrate the orders table to the new schema"}
{"sid":"7c2e","cwd":"/home/me/code/api","cfg":".claude-work","seen":"2026-11-14 19:14","doing":"sweep the flaky test backlog"}
{"sid":"e94b","cwd":"/home/me/code/web","cfg":".claude-work","seen":"2026-11-14 19:14","doing":"fix the signup form validation"}

That output is from running hooks/board-register.sh with three sessions' hook payloads. Rows refresh on every prompt, drop on SessionEnd and age off after 24 hours.

Around the board sit four more patterns I use every day: handoff docs, a per-repo state ledger, config sync across accounts and an overnight queue.

Install the board

# 1. Install the board hook
mkdir -p ~/.claude/hooks
cp hooks/board-register.sh ~/.claude/hooks/
chmod +x ~/.claude/hooks/board-register.sh

# 2. Merge hooks/settings.snippet.json into ~/.claude/settings.json

# 3. Install the check
cp hooks/board-check.sh ~/.claude/hooks/
chmod +x ~/.claude/hooks/board-check.sh

# 4. Teach your sessions the protocol (global CLAUDE.md):
#    "Before starting batch-type work on a shared resource, run
#     ~/.claude/hooks/board-check.sh and look for a sibling session
#     in the same repo with overlapping intent."

The check prints the other sessions in the current repo and exits 1 when there are any:

$ ~/.claude/hooks/board-check.sh
other sessions in /home/me/code/api:
a1f3  .claude  2026-11-14 19:14  migrate the orders table to the new schema
7c2e  .claude-work  2026-11-14 19:14  sweep the flaky test backlog

Then read the patterns in order. Each one stands alone, but 01–03 are the core loop.

The five patterns

# Pattern Fixes
01 Session board — every live session self-registers to a shared JSONL presence board via hooks; sessions check it before grabbing batch work Duplicate work
02 Handoff docs — plan in one chat, write a standardized handoff file, execute in a fresh chat with full context Lost context (between chats)
03 State ledger — a per-repo "where are we" file that outlives every session and is verified against git reality Lost context (over time)
04 Config sync — N config dirs, one git-tracked source of truth: symlink what can't drift, sync what must be copied Configuration drift
05 Overnight queue — bank autonomous-shaped work into a queue; a scheduler runs it headless while you sleep Idle hours

The patterns compose. The board tells a session what its siblings are doing right now; the ledger tells it what happened before it existed; the handoff tells it what it was born to do; the overnight queue extends all of that into hours when no human is watching; and config sync guarantees every one of those sessions behaves identically no matter which account it runs under.

Why parallel sessions at all

One Claude Code session is an assistant. Five concurrent sessions — one planning, one executing a refactor, one sweeping a backlog, one on a different repo, one queued for tonight — are a workforce. Rate limits, context windows, and human attention all parallelize better than they serialize. The ceiling on output stops being "how fast can one chat go" and becomes "how well do the chats coordinate."

That coordination does not happen by itself. Scale past two sessions and three failure modes show up almost immediately:

  1. Duplicate work. Two sessions grab the same batch, the same migration, the same sweep — and you find out when the second one hits a merge conflict or double-processes half the queue.
  2. Lost context. The plan lived in chat A; execution starts in chat B with none of it. Decisions get re-litigated, gotchas get re-discovered, and "where were we?" gets answered from memory — wrongly.
  3. Idle hours. The work that needed no human — bulk transforms, report generation, sweep-and-fix passes — sat in a queue of one (your head) while every session slept.

A fourth, quieter one arrives when you run multiple config dirs for multiple accounts: configuration drift — three environments that were supposed to be identical, slowly diverging until "works in this terminal, not that one" becomes a debugging category.

Working artifacts

Doctrine is in patterns/. The pieces you actually install are:

License

MIT — see LICENSE.


Built by Dylan Pulver, software engineer and entrepreneur in Toronto.

About

How to run Claude Code as a team of agents: session board, handoffs, state ledgers, config sync, and an overnight queue. Patterns run daily across 3+ parallel accounts.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages