Spool
A shared task board for coding agents. Plan work in streams, claim a ready task, keep notes, and hand it off with enough context for the next agent to continue.
Agents in the same repository's Git worktrees share a live board. Claims are atomic, expire when abandoned, and carry a token that prevents a stale worker from changing reclaimed work. Durable task history travels with Git. Telephone provides agent discovery and messaging.
Install
Install from crates.io with Rust 1.88+, or download the CLI and TUI binaries for Linux and macOS from GitHub Releases.
Shared worktree boards require Git 2.31+. All participating agents should use the same version. To install from a source checkout, use cargo install --path crates/spool-cli --locked.
The work loop
Initialize once at the repository root and give each agent session a unique identity:
Identity precedence is --agent, SPOOL_AGENT, TELEPHONE_ADDR, then the Git user for ordinary human edits. Claiming and renewing work require an explicit session identity. Multiple agents must not share the same session identity.
next selects and claims the highest-priority available task in one transaction. Its response includes the task's description, notes, prerequisites, and claim.token. It returns JSON null when no work is available. Use claim <id> to choose a task explicitly.
Keep the returned token for that task:
The default lease is 15 minutes. Renew before it expires; --lease-seconds 3600 requests an hour. Durations range from 1 second to 24 hours. A current token and matching identity are required to change a claimed task. Notes can be added by any collaborator.
When pausing, leave a useful resumption point:
release clears the assignment and lease. Once a lease expires, any collaborator can release the abandoned task without a token and record a recovery note, even if prerequisites prevent reclaiming it. An expired lease can be reclaimed by another agent, including when the original worker had a reservation. Every fresh claim gets a new token. An old token cannot renew, complete, release, or edit a subsequent claim, even if the agent identity is reused.
Plan work
Streams group related tasks into a project or epic. Put scope, acceptance criteria, file ownership, and expected output in the description.
A task is ready when it is open, has no live claim, all prerequisites are complete, and any pending assignment matches the requesting agent. Missing prerequisites keep it blocked. Cycles and self-dependencies are rejected. Completing a prerequisite makes its dependents eligible; it never completes them automatically. Any completion resolution resolves a prerequisite. Marking a task done requires its prerequisites to be complete; cancellation resolutions can close blocked work.
Priorities are p0 through p3, with p2 as the default. Streams accept IDs or names; new and renamed stream names are trimmed and lowercased. Task commands accept an unambiguous ID prefix. link / unlink also support blocks, blocked_by, and parent relationships.
Find context quickly
Task status remains open or complete. work_status describes the current view: open, blocked, in_progress, or complete. ready is relative to the requesting agent. assignee is a reservation; claim identifies the active worker and its lease.
--json works on every command. Successful commands write one JSON value to stdout; errors write a JSON object to stderr:
Exit codes are 0 for success (including an empty queue), 1 for task/data/I/O errors, and 2 for claim conflicts, expired/stale claims, a busy board, or argument errors. Use error.code to distinguish cases. List responses omit descriptions and notes; show, claim, and next return full task context. Existing list -f json and -f ids remain available. Reads always replay the current event log, so no rebuild hook is needed after edits or Git operations.
Pair with Telephone
Use a real per-session address from Telephone as TELEPHONE_ADDR, or pass it to Spool with --agent. For a polling runtime, Telephone can create the address:
A handoff saves the recipient, note, and optional reference together, and releases the current claim:
The response includes notification.to and notification.message. Send that payload with Telephone when you want to notify the recipient:
# handoff.json contains the JSON returned above.
Spool saves the handoff without invoking Telephone. The recipient reads the task, then claims it using the assigned address as its Spool identity (--agent can override a different SPOOL_AGENT). If delivery is delayed or uncertain, the assignment and context remain discoverable through spool list --mine and show. Follow Telephone's delivery report; successful sending is not a read receipt. Spool also works with human assignees and agents that have no Telephone address.
Git and worktrees
Inside a Git repository, the live board is in <git-common-dir>/spool. All linked worktrees use that directory, including worktrees created before initialization. Switching code branches does not roll back the live board. spool status shows the exact board and checkout paths.
Each command imports durable events found in its checkout's .spool. Export the shared board before committing:
sync exports the whole shared board, including work recorded in other worktrees. It writes missing immutable events into this checkout's .spool/events; it does not create Git commits or push anything. Existing daily logs and archives stay readable and are never rewritten. Exact duplicate events replay once. New changes use separate content-addressed files so agents can add events on different branches without appending to the same file.
Claims and renewals live under .local/events in the live board. They survive process exits but are excluded from Git exports. A clone starts with task history and reservations, then establishes its own local claims. Independent clones or machines do not share atomic claims. This is a local collaboration tool, matching Telephone's same-machine scope. Use a local filesystem and one shared board for agents that need exclusive claims.
Outside Git, Spool uses the nearest .spool directly, with local lease files gitignored. spool archive retains history while hiding old completed tasks; reopen makes an archived task visible again. spool rebuild remains available to write diagnostic snapshots; those snapshots are never used as authoritative reads.
Upgrading an existing board
The first run imports existing events and updates the format marker to 0.5.0. Existing tasks, streams, comments, and completion history remain available. The important workflow changes are:
- Use a unique agent identity and keep claim tokens.
- Run
spool syncto export shared progress before committing. - Stop using older Spool binaries on the upgraded board; older writers do not participate in its coordination protocol.
See the short agent guide for the task workflow.
Optional TUI
Install with cargo install spool-ui --version 2.0.0 --locked, then run spool-ui to open the board. From a source checkout, use cargo run -p spool-ui. It shows active agents and lease expiry and watches shared task and lease events. The a action reserves a task for the current user. Active agent claims are protected from TUI edits; use the CLI with the current token for lease operations. Press ? for shortcuts.
Development
MIT licensed.