Claim next task
claim_next_taskClaim the next priority todo task and set it to in-progress, prioritizing root tasks before their children. Optional type, user, or tag filters narrow the pool; preview with dryRun.
Instructions
Claim the highest-priority todo task and set it to in-progress: the returned object IS the claimed task. Roots first: a todo ROOT is claimed before any child — the root is the unit of work, so work through its children after claiming it. When no todo root is claimable, falls back to the highest-priority matching todo child of live work (parent chain todo/in-progress/review) and says so explicitly (a CHILD_CLAIM notice naming the parent); children of backlog/done parents are refused, never sliced off. Optional type/user/tag filters narrow the pool (tags every-match); pass dryRun to preview the claim without moving the task. An empty board — or a valid filter matching nothing — is a SUCCESS with a null result, the same as 'vibeflow tasks --next --json' reporting task:null with exit 0. Use it to pull the next unit of work; use list_tasks to browse without claiming, and get_task to inspect a task you already hold.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | Only claim a task carrying every listed tag (AND). Omit for no tag filter. | |
| type | No | Only claim a task of this type. Omit to claim across all types. | |
| user | No | Only claim a task assigned to this user (matched against the task author). Omit to claim anyone's work. | |
| dryRun | No | Preview only: name the task that WOULD be claimed without moving it to in-progress. |