Answer: Use a TaskTracker class that watches the assistant stream for `TaskCreate` and `TaskUpdate` `tool_use` blocks, keeps a map of tasks keyed by task ID, and rerenders a progress summary on every change. Enable the todo tools by setting the env var `CLAUDE_CODE_ENABLE_TODO_TOOLS` to "1" in the query options. Status: Confirmed Entry: tool/claude-code/agents-and-automation/display-todo-progress-realtime Revision: 2 Digest: sha256:6fbd0ea39bdf3b44 (changes whenever the content changes) Timeline: Created: 2026-11-13T03:03:04Z Last changed: 2026-11-17T12:21:48Z (Env var: — → CLAUDE_CODE_ENABLE_TODO_TOOLS: "1") Last verified: 2026-11-20T12:17:32Z Next check: 2026-11-21T12:17:32Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Approach | watches the assistant stream for `TaskCreate` and `TaskUpdate` `tool_use` blocks | [1] | 2026-11-20 Task storage | keeps a map of tasks keyed by task ID in a `TaskTracker` class | [1] | 2026-11-20 Summary contents | counts completed and in-progress tasks and shows each active item's `activeForm` label in place of its `subject` | [1] | 2026-11-20 Task ID source | reads `task.id` from the paired message's `tool_use_result` | [1] | 2026-11-20 Env var | CLAUDE_CODE_ENABLE_TODO_TOOLS: "1" | [1] | 2026-11-20 Max turns | maxTurns: 20 | [1] | 2026-11-20 Sources: [1] Anthropic. "Track todos". https://code.claude.com/docs/en/agent-sdk/todo-tracking.md Role: primary. Accessed: 2026-11-20T12:17:32Z Quote: "The following example watches the assistant stream for `TaskCreate` and `TaskUpdate` `tool_use` blocks" (Supports: Approach) Quote: "keeps a map of tasks keyed by task ID in a `TaskTracker` class, rerendering a progress summary on every change" (Supports: Task storage) Quote: "The summary counts completed and in-progress tasks and shows each active item's `activeForm` label in place of its `subject`." (Supports: Summary contents) Quote: "The tracker pairs each `tool_result` block with its `tool_use` call by `tool_use_id` and reads `task.id` from the paired message's `tool_use_result`." (Supports: Task ID source) Quote: "env: { ...process.env, CLAUDE_CODE_ENABLE_TODO_TOOLS: "1" }" (Supports: Env var) Quote: "options: { maxTurns: 20, permissionMode: "acceptEdits"" (Supports: Max turns) Published: 2026-11-20T03:58:24Z Snapshot SHA-256: b4f595ba02232c17c2383d44be552c911bfb4b0c08334c8e3a6180eb45c8ef85 (captured 2026-11-17T12:21:46Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-17T12:21:48Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:17:32Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:17:32Z Last attempt: 2026-11-20T12:17:32Z Notes and limitations: Extracted automatically from a single official source (section "Display progress in real time"). Related: https://latestn.com/tool/claude-code/agents-and-automation/enable-agent-teams How do I enable agent teams in Claude Code? https://latestn.com/tool/claude-code/agents-and-automation/enable-file-checkpointing How do I enable file checkpointing in the Claude Code Agent SDK? https://latestn.com/tool/claude-code/agents-and-automation/enable-streaming-output How do I enable streaming output in the Claude Code Agent SDK? https://latestn.com/tool/claude-code/agents-and-automation/disable-filesystem-settings-setting-sources How do I disable filesystem settings like CLAUDE.md and skills in a Claude Code SDK agent? https://latestn.com/tool/claude-code/agents-and-automation/disable-subagents How do I disable specific subagents in Claude Code? https://latestn.com/tool/claude-code/agents-and-automation/dispatch-agent-from-shell How do I dispatch a new background agent from the Claude Code shell? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-17T12:21:48Z | changed | Env var: — → CLAUDE_CODE_ENABLE_TODO_TOOLS: "1" | [1] 2026-11-17T12:21:48Z | changed | Summary contents: — → counts completed and in-progress tasks and shows each active item's `activeForm` label in place of its `subject` | [1] 2026-11-17T12:21:48Z | changed | Task storage: — → keeps a map of tasks keyed by task ID in a `TaskTracker` class | [1] 2026-11-17T12:21:48Z | changed | Permission mode: permissionMode: "acceptEdits" → — | [1] 2026-11-17T12:21:48Z | changed | Environment variable: CLAUDE_CODE_ENABLE_TODO_TOOLS: "1" → — | [1] 2026-11-17T12:21:48Z | changed | Pairing key: pairs each `tool_result` block with its `tool_use` call by `tool_use_id` → — | [1] 2026-11-17T12:21:48Z | changed | Approach: watches the assistant stream for `TaskCreate` and `TaskUpdate` `tool_use` blocks and keeps a map of tasks keyed by task ID in a `TaskTracker` class, rerendering a progress summary on every change → watches the assistant stream for `TaskCreate` and `TaskUpdate` `tool_use` blocks | [1] 2026-11-13T03:03:04Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/claude-code/agents-and-automation/display-todo-progress-realtime/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/claude-code/agents-and-automation/display-todo-progress-realtime POST: https://latestn.com/dispute/tool/claude-code/agents-and-automation/display-todo-progress-realtime with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/claude-code/agents-and-automation/display-todo-progress-realtime?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I display Claude's todo progress in real time in my application using the Agent SDK? Revision 2, last verified 2026-11-20T12:17:32Z. https://latestn.com/tool/claude-code/agents-and-automation/display-todo-progress-realtime (accessed 2026-11-21T10:03:00Z). @misc{LatestN_tool_claude_code_agents_and_automation_display_todo_progress_realtime_r2, title = {How do I display Claude's todo progress in real time in my application using the Agent SDK?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/claude-code/agents-and-automation/display-todo-progress-realtime}}, note = {Revision 2; digest sha256:6fbd0ea39bdf3b44; last verified 2026-11-20T12:17:32Z; accessed 2026-11-21T10:03:00Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/claude-code/agents-and-automation/display-todo-progress-realtime