PostToolUse hook does not fire for TodoWrite tool

Resolved 💬 3 comments Opened Jan 22, 2026 by rubrical-worker Closed Feb 28, 2026

Summary

PostToolUse hooks with matcher: "TodoWrite" do not fire when the TodoWrite tool is called.

Steps to Reproduce

  1. Configure a PostToolUse hook in .claude/settings.local.json:
{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "TodoWrite",
        "hooks": [
          {
            "type": "command",
            "command": "node .claude/hooks/track-todo-progress.js",
            "timeout": 10
          }
        ]
      }
    ]
  }
}
  1. Have Claude call TodoWrite (e.g., update the todo list)
  1. Check if hook executed (e.g., look for output file the hook creates)

Expected Behavior

The hook should fire after every TodoWrite tool call, receiving { tool_name, tool_input, tool_result } via stdin.

Actual Behavior

The hook never fires for TodoWrite.

Note: The same hook configuration pattern works correctly for Edit and Write tools:

{ "matcher": "Edit|Write", ... }  // This works
{ "matcher": "TodoWrite", ... }   // This does NOT work

Environment

  • Claude Code version: Latest (Jan 2026)
  • OS: Windows 11
  • Node.js: v24.13.0

Use Case

We're building a "todo compaction persistence" feature that tracks todo progress so Claude can resume after context compaction. This requires knowing when todos are updated, which PostToolUse for TodoWrite would provide.

Workaround Attempted

Manually testing the hook script works:

echo '{"tool_name":"TodoWrite","tool_input":{"todos":[...]},"tool_result":"success"}' | node hook.js
# Works correctly

This confirms the hook script is correct, but Claude Code isn't invoking it.

Request

Please either:

  1. Enable PostToolUse hooks for TodoWrite (and other internal tools)
  2. Document which tools support PostToolUse hooks
  3. Provide an alternative hook point for observing TodoWrite calls

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗