Add a task. Use when follow-up work is identified or when breaking down complex work into subtasks.
Add a task to TASKS.md.
Three questions: if any answer is "no", don't record:
Tasks should describe what to do and why, not just a topic.
If the user provides only a topic, ask:
ctx add task "Task description" \
--session-id SESSION --branch BRANCH --commit HASH \
[--priority high|medium|low] [--section "Phase N"]
Provenance flags (--session-id, --branch, --commit) are required.
Get these values from the hook-relayed provenance line in your context
(e.g., Session: abc12345 | Branch: main @ 68fbc00a).
Prefer this skill over raw ctx add task: the conversational
approach lets you automatically pick up session ID, branch, and commit
from the provenance line already in your context window.
Placement: Without --section, the task is inserted before the
first unchecked task in TASKS.md. Use --section only when you need
a specific section (e.g., --section "Maintenance").
Example: specific and actionable:
ctx add task "Add --cooldown flag to ctx agent to suppress repeated output within a time window. Use tombstone file per session for isolation." \
--session-id abc12345 --branch main --commit 68fbc00a \
--priority medium
Example: with context for why:
ctx add task "Investigate ctx init overwriting user-generated content in context files. Commit a9df9dd wiped 18 decisions from DECISIONS.md. Need guard to prevent reinit from destroying user data." \
--session-id abc12345 --branch main --commit 68fbc00a \
--priority high
Example: scoped subtask:
ctx add task "Add topic-based navigation to blog when post count reaches 15+" \
--session-id abc12345 --branch main --commit 68fbc00a \
--priority low
Bad examples (too shallow):
ctx add task "Fix bug" # What bug? Where?
ctx add task "Improve performance" # Of what? How?
ctx add task "Authentication" # That's a topic, not a task
# Also bad: missing --session-id, --branch, --commit
Before recording, verify:
Confirm the task was added.