Coding agents in containers, one per issue
Long-running agentsTeam running Claude Code headless in containers on its own server
We run up to six containers on a spare server. Each one picks a GitHub issue labelled 'agent', runs Claude Code headless, and opens a pull request. Twice a week, two containers took the same issue, and every container started cold, rereading the repo.
How do I stop two headless Claude Code containers from working on the same GitHub issue?
Set up ArcRoom in each container with npx arcroom init, using ARCROOM_API_KEY and ARCROOM_APPROVE_CHECKS from secrets, and have the agent call claim_task on the issue before it starts. A second container sees the claim and picks another. Saved answers, decisions and code map lines reach every container through recall, and a final arcroom flush saves what it learned.
Also asked as: Our agent containers keep picking the same issue and rereading the repo. What can we do? · How do I share memory between Claude Code agents running in Docker containers? · Can parallel headless agents claim tasks so they don't overlap?
Each container runs npx arcroom init with ARCROOM_API_KEY and ARCROOM_APPROVE_CHECKS from secrets.
- Claim
- Code map
- Decision
- Recall
- Flush in CI
claim_task → already claimed: "issue #812 date picker in Safari" (container w3, 9 min ago)
Step by step
- Each container runs npx arcroom init with ARCROOM_API_KEY and ARCROOM_APPROVE_CHECKS from secrets.
- Before starting, the agent calls claim_task on the issue; a second container sees the claim and picks another.
- Saved answers, decisions and code map lines reach every container through recall.
- The container's last step is arcroom flush, so what it learned is saved before it is removed.
What the agent sees
claim_task → already claimed: "issue #812 date picker in Safari" (container w3, 9 min ago)
Recall: code map · packages/ui/date: wraps react-day-picker, Safari fix in polyfills.tsCompared with today's tools
GitHub issue assignment
A worker assigns the issue to a bot account before starting, and other workers skip assigned issues.
- Setup
- 1–2 hours
- Ongoing
- Unassign issues from crashed workers, ~15 min a week
ArcRoom
Every agent reads the team playbook before it works and writes to it when it finishes. Nothing to update by hand.
- Setup
- 2 min (npx arcroom init)
- Ongoing
- None
Assignment is a fine lock and visible to people; it doesn't give the next container the repo knowledge earlier containers gathered.
Where it stops
Handover comes through saved steps, answers and the project's last-run note. Claims prevent duplicates only if the agent calls claim_task first.
Try it in your project
Works with the agents your team already uses, and any agent over MCP or the HTTP API.
More in long-running agents
- Bot-driven sessions that don't redo the last one's workDeveloper who runs claude -p from a chat bot on a home PC
- A three-day migration where no part is done twiceDeveloper leaving Claude Code on a long migration over a weekend
- Three scheduled agents, nothing done twiceSolo founder scheduling headless agents on a home machine