Atomic Task Claiming
Dozens of agents race to claim the same task queue — only one wins. SQLite CAS ensures zero duplicated work, no Redis required.
How it works
- Create tasks on the board with
status: "todo" - Any agent calls
POST /api/board/:id/claim - SQLite CAS: only one claim succeeds — task moves atomically to "doing"
- The losing agents get a 409 conflict and try the next task
When to use this
- Running 10+ agents against the same task queue without duplicated work
- Building a fan-out orchestration pattern without a message broker
- Parallel test generation, bug fixing, or refactoring sprints
Example
# Agent claims a task atomically
curl -sk -X POST $AMUX_URL/api/board/PROJ-5/claim
# → 200 if claimed, 409 if another agent already took it
# Mark done when finished
curl -sk -X PATCH $AMUX_URL/api/board/PROJ-5 \
-H 'Content-Type: application/json' \
-d '{"status":"done"}'
Related demos
Try amux
Run dozens of Claude Code agents in parallel. Python 3 + tmux. Open source.
git clone https://github.com/mixpeek/amux && cd amux && ./install.sh
amux register myproject --dir ~/Dev/myproject --yolo
amux serve # → https://localhost:8822
View on GitHub
Getting started →