Tasks
Task
A task read from Claude Code’s native task store (~/.claude/tasks/<list-id>/<id>.json).
Usage
Task(
*,
id,
subject,
status,
description="",
owner=None,
blocked_by=(),
blocks=()
)Parameter Attributes
id: strsubject: strstatus: strdescription: str = ""owner: str | None = Noneblocked_by: tuple[str, …] = ()blocks: tuple[str, …] = ()
Tasks
The live task list for one session, read from the native store rather than the transcript.
Usage
Tasks(tasks=())Always keyed by the exact list id (session id) — a session with no store has no tasks, never another session’s. This is the source of truth for completion gates; transcript-derived task_ops() misses updates made by subagents, teammates, or resumed sessions.
Parameter Attributes
tasks: tuple[Task, …] = ()
Methods
| Name | Description |
|---|---|
| for_session() |
Load the task list for session_id, empty when absent.
|
| resolve_root() |
Resolve the root of Claude Code’s native task store (<config-dir>/tasks).
|
for_session()
Load the task list for session_id, empty when absent.
Usage
for_session(session_id, *, root=None)Claude Code names the store dir either by the exact session id (legacy) or session-<first-8-chars> (current); an exact-id dir wins over the truncated one.
resolve_root()
Resolve the root of Claude Code’s native task store (<config-dir>/tasks).
Usage
resolve_root()