Skip to content

tasks

tasks

Task dataclass

Task(
    *,
    id: str,
    subject: str,
    status: str,
    description: str = "",
    owner: str | None = None,
    blocked_by: tuple[str, ...] = (),
    blocks: tuple[str, ...] = (),
)

A task read from Claude Code's native task store (~/.claude/tasks/<list-id>/<id>.json).

Tasks dataclass

Tasks(tasks: tuple[Task, ...] = ())

Bases: Sequence[Task]

The live task list for one session, read from the native store rather than the transcript.

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.

resolve_root classmethod
resolve_root() -> Path

Resolve the root of Claude Code's native task store (<config-dir>/tasks).

for_session classmethod
for_session(
    session_id: str, *, root: Path | None = None
) -> Tasks

Load the task list stored under session_id, empty when absent.