Features
Subtasks & Dependencies
Build task hierarchies and dependency relationships with Asana CLI
Subtasks & Dependencies
Model complex workflows by breaking work into subtasks and expressing "blocked by / blocking" relationships between tasks.
Subtasks
Subtasks let you decompose a task into smaller pieces while keeping them grouped under a parent.
List Subtasks
# Direct children of a parent task
bun run dev task subtask list PARENT_ID
# All nested levels (recursive)
bun run dev task subtask list PARENT_ID --recursive
Recursive output includes a depth column so you can see the hierarchy
(0 = direct child, 1 = grandchild, and so on).
Create a Subtask
bun run dev task subtask create PARENT_ID \
--name "Write unit tests" \
--notes "Cover edge cases" \
--assignee me \
--due-on 2026-07-01
Convert an Existing Task into a Subtask
Re-parent any existing task under a new parent:
bun run dev task subtask add TASK_ID PARENT_ID
Dependencies
A dependency means "this task is blocked by another task." The blocking task must be completed first. The inverse relationship is a dependent.
Add a Dependency
# TASK_ID is blocked by BLOCKER_ID
bun run dev task dependency add TASK_ID BLOCKER_ID
List Dependencies (what blocks this task)
bun run dev task dependency list TASK_ID
List Dependents (what this task blocks)
bun run dev task dependent list TASK_ID
Remove a Dependency
bun run dev task dependency remove TASK_ID BLOCKER_ID
Limits & Validation
The CLI also rejects:
- Self-dependencies — a task cannot depend on itself.
- Invalid GIDs — all task GIDs must be numeric.
Circular dependencies (for example, A blocks B and B blocks A) are rejected by the Asana API; the CLI surfaces the API error message so you can resolve the cycle.
Example Workflow
# 1. Create a parent feature task
bun run dev task create -n "Ship checkout flow" -w WORKSPACE_ID
# 2. Break it into subtasks
bun run dev task subtask create PARENT_ID --name "Design API"
bun run dev task subtask create PARENT_ID --name "Implement API"
bun run dev task subtask create PARENT_ID --name "Write tests"
# 3. Express ordering: "Implement API" is blocked by "Design API"
bun run dev task dependency add IMPLEMENT_ID DESIGN_ID
# 4. Inspect what is blocked by the design task
bun run dev task dependent list DESIGN_ID
Related
- Task Management - Core task operations
- Quick Start - Basic command examples