Kanban
A shared task board for agents that work in parallel
Kanban is a shared task board for agents. You, or an agent acting as coordinator, put tasks on the board. Each task is assigned to a profile, which is a named agent with its own settings and memory. Headmaster starts that agent to work the task, and every comment, hand-off and result is saved on the board.
Use it when work should outlive one chat, might need your input halfway, or should pass between agents with different roles, for example a researcher, a writer and a reviewer.
Kanban or sub-agents
Sub-agents (delegate_task) | Kanban | |
|---|---|---|
| Shape | A call that waits for its answer | A durable queue |
| Who does the work | An anonymous helper | A named profile with its own memory |
| If it fails | The call fails | The task can be blocked, unblocked and run again |
| You can step in | No | Comment or unblock at any time |
| History | Lost when a long chat is shortened | Kept on the board |
Use a sub-agent for a quick answer the main agent needs right now. Use Kanban for work that crosses roles, must survive restarts, or needs a person in the loop. They can be used together.
Concepts
- Board. A separate queue of tasks with its own database, workspaces and logs. You start with one board,
default. Add more to keep projects apart. - Task. A title, an optional body, one assignee, and a status:
triage,todo,ready,running,blocked,review,doneorarchived. - Link. A parent-to-child dependency. A child moves from
todotoreadywhen all its parents aredone. - Comment. How agents and people talk. When a worker starts, it reads the whole thread.
- Workspace. Where the worker operates:
scratch(default): a temporary folder, deleted when the task completes.dir:<path>: an existing folder, given as an absolute path.worktree: a git worktree for coding tasks, kept after completion. See Git worktrees.
- Dispatcher. A loop that picks up
readytasks, starts the assigned profile, and recovers tasks whose worker crashed or timed out. - Tenant. An optional label inside a board to keep one team's tasks apart from another's. A board is the hard boundary. A tenant is a soft filter.
Quick start
headmaster kanban init
headmaster gateway start
headmaster kanban create "Research AI funding landscape" --assignee researcher
headmaster kanban watch
headmaster kanban list
The dispatcher runs inside the gateway by default, so keep the gateway running. Without it, ready tasks wait. kanban create warns you when no gateway is up.
kanban:
dispatch_in_gateway: true
dispatch_interval_seconds: 60
Once a worker starts, it reads and updates its task through its own board tools. You use the commands below.
Creating tasks
headmaster kanban create "<title>" [options]
| Option | What it does |
|---|---|
--body, --body-file PATH | The opening description. --body-file - reads standard input. |
--assignee PROFILE | The profile that does the work. |
--parent ID | A parent task. Repeat it for several. |
--workspace | scratch, worktree, worktree:<path> or dir:<path>. |
--branch NAME | Branch name for a worktree task. |
--priority N | A tiebreaker for ordering. |
--triage | Park it so a specifier can write the full spec and promote it. |
--idempotency-key KEY | If a live task has this key, return it instead of making a duplicate. |
--max-runtime | A time cap such as 30m, 2h or 1d. At the cap the worker is stopped and the task is queued again. |
--max-retries N | Block after this many failures. |
--skill NAME | Load this skill for the worker. Repeat it for several. |
--model | Pin the worker to a model. |
--tenant NAME | Put it in a tenant. |
Working the board
| Command | What it does |
|---|---|
list | List tasks. Filter with --mine, --assignee, --status, --tenant, --archived. |
show ID | Show one task. |
edit ID | Change the title, body or priority. |
assign ID PROFILE | Assign it, or use none to unassign. |
comment ID "text" | Add a comment. |
link PARENT CHILD, unlink PARENT CHILD | Manage dependencies. |
complete ID... | Mark done, with --result for a summary. |
block ID "reason", unblock ID... | Pause a task for input, then release it. |
archive ID... | Archive finished tasks. |
schedule ID --at TIME | Start at an ISO 8601 time. |
watch | Stream every event live. |
tail ID | Follow one task's events. |
runs ID | Show each attempt. |
log ID | Show the worker's log. |
stats | Counts by status and assignee. |
diagnostics | A board health check. |
Each is run as headmaster kanban <command>. Add --json to most for scripts.
If a task asks for review, request-review, request-changes and reopen-review move it between the implementer and the reviewer.
Boards
headmaster kanban boards create my-project --name "My project"
headmaster kanban boards list
headmaster kanban boards switch my-project
headmaster kanban boards show
headmaster kanban boards rename my-project "New name"
headmaster kanban boards rm my-project
rm archives the board and it can be recovered. Add --delete to remove it for good. boards export saves a board to a .tar.gz and boards import loads one as a new board. An import never overwrites or merges into an existing board. A worker only ever sees its own board, and tasks cannot be linked across boards.
Notifications and cleanup
- In a messaging app,
/kanbanruns the same commands, and you can subscribe a chat to a task to be told when it finishes or blocks. - The desktop app can notify you about task events.
headmaster kanban gcremoves old workspaces, events and logs. Set the retention with--event-retention-daysand--log-retention-days.0turns that sweep off.
Tips
- Write each task so it stands alone. The worker sees the body, the comments and the results of its parent tasks, not your chat.
- Do not link a support task to the task it is meant to unblock. A link makes it a child of the blocked task, so neither can start. Put the blocked task's ID in the support task's body.
- Use cheaper models for worker profiles and a stronger one for the coordinator. A profile's model setting applies to its tasks.
