Expand description
Read-side access to Claude Code’s on-disk task-tool state.
The task tools (TaskCreate / TaskUpdate) persist one JSON file
per task item under ~/.claude/tasks/<session-id>/<n>.json:
{
"id": "1",
"subject": "Untrack the local config artifact",
"description": "...",
"activeForm": "Untracking the local config artifact",
"status": "completed",
"blocks": [],
"blockedBy": []
}This module lists and parses them; it is read-only on purpose,
like the other introspection modules. The layout is undocumented
Claude Code internal state (observed against CLI 2.1.219) and
can change across CLI versions, so parsing is defensive: every
typed field is Option-shaped, a field with an unexpected JSON
type stays in Task::rest, and unknown fields land there too.
TasksRoot::list_sessions– which sessions have task lists, with counts.TasksRoot::list– one session’s tasks in numeric file order.
§Example
use claude_wrapper::tasks::TasksRoot;
let root = TasksRoot::home()?;
for list in root.list_sessions()? {
println!("{}: {} tasks", list.session_id, list.task_count);
}Structs§
- Task
- One task item parsed from
<n>.json. - Task
List Summary - One session that has task-tool state, returned by
TasksRoot::list_sessions. - Tasks
Root - Root directory of Claude Code’s task-tool state. Defaults to
~/.claude/tasks; override withTasksRoot::atfor tests or non-default installs.