Tasks
Use the bb tasks CLI to understand the assigned task, keep its record useful,
and report the outcome where the work is tracked.
For task dispatch and execution presets, read
references/delegation.md.
Work a task
Find and read the task before acting:
bb tasks show ABC-12
The detail includes the description, status, priority, labels, subtasks,
comments, attachments, attached worker threads, and the GitHub pull
requests those threads produced (from environment metadata, with state
open/draft/merged/closed). Use
bb tasks show ABC-12 --json when the result will drive commands or code.
For project-wide discovery, bb tasks list returns at most 100 rows by
default. Pass --limit 1-500; in JSON, continue with nextCursor via the
same filters/sort and --cursor <value>. A task-list mutation makes an old
cursor stale, so restart without it.
Fetch every relevant attachment before making assumptions about it:
bb tasks attachment get <attachment-id> --out <path>
Do the work. Post one substantive comment at each meaningful milestone,
such as a completed investigation, an implementation ready for validation,
or a concrete blocker:
bb tasks comment ABC-12 --body "Implemented the change; focused validation now passes."
Add --notify only when the new comment should be delivered to the thread
that authored the task's most recent agent reply. This resumes an idle
recipient; with no prior agent reply, the comment is recorded without
targeting an unrelated thread. In agent context, the new comment keeps the
current thread identity and an explicit --author, while delivery still
targets the prior latest responder rather than the new comment itself.
Attach result artifacts that belong with the task, such as reports,
screenshots, patches, or generated files:
bb tasks attachment add ABC-12 --file ./report.md
bb tasks attachment add ABC-12 --file ./screenshot.png
Read references/attachments.md for comment attachments, initial files,
removal rules, and machine selection.
Set the status to match the completion criteria. Use done when they are
met, or in_review when required review remains:
bb tasks update ABC-12 --status in_review
Change task hierarchy with bb tasks update ABC-12 --parent ABC-10, using
either a task key or ID for the parent. Promote a subtask to the top level
with bb tasks update ABC-12 --no-parent; the two parent flags cannot be
combined.
If the work cannot proceed, leave the status accurate and comment with the
specific blocker, what you tried, and what would unblock it. Do not mark a
blocked task complete.
Delegated threads are attached automatically. If this thread was not
delegated from Tasks, attach it yourself so the task shows the active work:
bb tasks attach ABC-12
When a thread is done with a task (hand-off, respawned replacement, or a
predecessor that died), detach it so bb tasks threads ABC-12 stays
accurate. Omit --thread to detach the current thread:
bb tasks detach ABC-12 --thread thr_dead_predecessor
Link tasks in responses
When your answer refers the user to a task — including a task you just
created — emit this leaf directive on its own line instead of writing the
key as plain text:
::task{key="ABC-12"}
key is required. Optionally add title="…" as a display fallback shown
while the card loads and when the key no longer resolves. The rendered card
shows the live status, title, and priority, opens the task in the thread
side panel, and links to the full Tasks app. Emit one directive per line;
each renders its own card.
Invariants
- Valid task statuses are
backlog, todo, in_progress, in_review,
done, and canceled.
- Use
in_review when implementation is complete but still needs human or
agent review. Use done only when the task's completion criteria are met.
- Write one comment per meaningful milestone. Combine related facts into a
useful update; never spam progress pings, command-by-command narration, or
repeated status messages.
- Comments should say what changed or was learned, what validation ran, and any
remaining risk or blocker.
- Prefer stable task keys such as
ABC-12 for task commands. Use --json for
machine-readable output and human output for quick inspection.
1---2name: tasks3description: Work on or manage records in BB Tasks, including task keys such as ABC-12.4---56# Tasks78Use the `bb tasks` CLI to understand the assigned task, keep its record useful,9and report the outcome where the work is tracked.1011For task dispatch and execution presets, read12[references/delegation.md](references/delegation.md).1314## Work a task15161. Find and read the task before acting:1718 ```sh19 bb tasks show ABC-1220 ```2122 The detail includes the description, status, priority, labels, subtasks,23 comments, attachments, attached worker threads, and the GitHub pull24 requests those threads produced (from environment metadata, with state25 open/draft/merged/closed). Use26 `bb tasks show ABC-12 --json` when the result will drive commands or code.2728 For project-wide discovery, `bb tasks list` returns at most 100 rows by29 default. Pass `--limit 1-500`; in JSON, continue with `nextCursor` via the30 same filters/sort and `--cursor <value>`. A task-list mutation makes an old31 cursor stale, so restart without it.32332. Fetch every relevant attachment before making assumptions about it:3435 ```sh36 bb tasks attachment get <attachment-id> --out <path>37 ```38393. Do the work. Post one substantive comment at each meaningful milestone,40 such as a completed investigation, an implementation ready for validation,41 or a concrete blocker:4243 ```sh44 bb tasks comment ABC-12 --body "Implemented the change; focused validation now passes."45 ```4647 Add `--notify` only when the new comment should be delivered to the thread48 that authored the task's most recent agent reply. This resumes an idle49 recipient; with no prior agent reply, the comment is recorded without50 targeting an unrelated thread. In agent context, the new comment keeps the51 current thread identity and an explicit `--author`, while delivery still52 targets the prior latest responder rather than the new comment itself.53544. Attach result artifacts that belong with the task, such as reports,55 screenshots, patches, or generated files:5657 ```sh58 bb tasks attachment add ABC-12 --file ./report.md59 bb tasks attachment add ABC-12 --file ./screenshot.png60 ```6162 Read `references/attachments.md` for comment attachments, initial files,63 removal rules, and machine selection.64655. Set the status to match the completion criteria. Use `done` when they are66 met, or `in_review` when required review remains:6768 ```sh69 bb tasks update ABC-12 --status in_review70 ```7172 Change task hierarchy with `bb tasks update ABC-12 --parent ABC-10`, using73 either a task key or ID for the parent. Promote a subtask to the top level74 with `bb tasks update ABC-12 --no-parent`; the two parent flags cannot be75 combined.7677 If the work cannot proceed, leave the status accurate and comment with the78 specific blocker, what you tried, and what would unblock it. Do not mark a79 blocked task complete.80816. Delegated threads are attached automatically. If this thread was not82 delegated from Tasks, attach it yourself so the task shows the active work:8384 ```sh85 bb tasks attach ABC-1286 ```8788 When a thread is done with a task (hand-off, respawned replacement, or a89 predecessor that died), detach it so `bb tasks threads ABC-12` stays90 accurate. Omit `--thread` to detach the current thread:9192 ```sh93 bb tasks detach ABC-12 --thread thr_dead_predecessor94 ```9596## Link tasks in responses9798When your answer refers the user to a task — including a task you just99created — emit this leaf directive on its own line instead of writing the100key as plain text:101102```md103::task{key="ABC-12"}104```105106`key` is required. Optionally add `title="…"` as a display fallback shown107while the card loads and when the key no longer resolves. The rendered card108shows the live status, title, and priority, opens the task in the thread109side panel, and links to the full Tasks app. Emit one directive per line;110each renders its own card.111112## Invariants113114- Valid task statuses are `backlog`, `todo`, `in_progress`, `in_review`,115 `done`, and `canceled`.116- Use `in_review` when implementation is complete but still needs human or117 agent review. Use `done` only when the task's completion criteria are met.118- Write one comment per meaningful milestone. Combine related facts into a119 useful update; never spam progress pings, command-by-command narration, or120 repeated status messages.121- Comments should say what changed or was learned, what validation ran, and any122 remaining risk or blocker.123- Prefer stable task keys such as `ABC-12` for task commands. Use `--json` for124 machine-readable output and human output for quick inspection.