Task* tools (TaskCreate, TaskUpdate, TaskList, TaskGet) bypass PreToolUse/PostToolUse hooks - user control regression

Status Fixed / completed
Reported on v2.1.17
Maintainer reply None cached
Activity 8 comments · opened Jan 23, 2026 · closed Jan 23, 2026

Summary

The newer Task* tools (TaskCreate, TaskUpdate, TaskList, TaskGet) completely bypass the PreToolUse and PostToolUse hook system, unlike TodoWrite which triggers hooks. This represents a regression in user control over agent behavior.

Problem

Users who have implemented hooks to monitor or control TODO/task modifications have no visibility or control when agents use Task* tools:

| Tool | Triggers PreToolUse? | Triggers PostToolUse? | User Control |
|------|---------------------|----------------------|--------------|
| TodoWrite | ✅ Yes | ✅ Yes | ✅ Full |
| TaskCreate | ❌ No | ❌ No | ❌ None |
| TaskUpdate | ❌ No | ❌ No | ❌ None |
| TaskList | ❌ No | ❌ No | ❌ None |
| TaskGet | ❌ No | ❌ No | ❌ None |

Impact

  1. No interception: Users cannot use PreToolUse hooks to approve/deny task modifications
  2. No audit trail: PostToolUse hooks cannot log task changes for forensics
  3. Protection bypass: Any hook-based protection against unauthorized task modification is ineffective
  4. State divergence: External systems monitoring via hooks see stale state

Reproduction

  1. Install PreToolUse hook that logs all tool invocations
  2. Use TaskCreate to add a new task
  3. Use TaskUpdate to modify task status
  4. Check hook logs - no events for Task* tools
  5. Compare with TodoWrite - hooks fire correctly

Expected Behavior

Task* tools should trigger PreToolUse and PostToolUse hooks like other tools, allowing users to:

  • Monitor task modifications
  • Implement approval workflows
  • Maintain audit trails
  • Build external integrations

Additional Context

  • TodoWrite is not available as an agent-callable tool (returns "No such tool available")
  • Task* tools appear to be the only agent-facing API for task management
  • This creates a gap where the observable tool (TodoWrite) isn't agent-callable, and the agent-callable tools (Task*) aren't observable

Environment

  • Claude Code version: 2.1.17
  • Platform: macOS Darwin 24.5.0

Suggested Solutions

  1. **Add hook support to Task tools* - Fire PreToolUse/PostToolUse for TaskCreate, TaskUpdate, etc.
  2. Or expose TodoWrite to agents - Allow agents to use the hook-observable path
  3. Or document the limitation - If intentional, document that Task* tools are unobservable by design

View original on GitHub ↗

8 Comments

github-actions[bot] · 7 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/20144
  2. https://github.com/anthropics/claude-code/issues/15872
  3. https://github.com/anthropics/claude-code/issues/20169

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

cversek · 7 months ago

Update: Confirmed Regression from 2.1.15 to 2.1.16

After testing multiple versions, this is a confirmed regression:

| Version | TodoWrite Available? | Task* Available? | Hooks Fire? |
|---------|---------------------|------------------|-------------|
| 2.1.15 | ✅ YES | ❓ Unknown | ✅ YES |
| 2.1.16 | ❌ No | ✅ Yes | ❌ No |
| 2.1.17 | ❌ No | ✅ Yes | ❌ No |

Evidence

In 2.1.15: TodoWrite is available and triggers hooks correctly:

PreToolUse:TodoWrite hook blocking error:
❌ TODO Collapse Blocked - User Authorization Required
Detected: Reducing from 59 items to 1 items (collapse of 58 items)

In 2.1.16+: TodoWrite returns "No such tool available" and Task* tools bypass hooks entirely.

Conclusion

The transition from TodoWrite to Task* tools between 2.1.15 and 2.1.16 removed user hook-based control over task modifications. This is not just a missing feature—it's a regression in user control that existed in the previous version.

Users who relied on PreToolUse hooks to monitor/control task modifications lost that capability when upgrading from 2.1.15 to 2.1.16+.

cversek · 7 months ago

Update 2: Root Cause Identified in v2.1.16 Release Notes

The v2.1.16 release notes explicitly state:

"Added new task management system, including new capabilities like dependency tracking"

This confirms:

  1. v2.1.15 (Jan 21): TodoWrite was the task system, hooks worked
  2. v2.1.16 (Jan 22): "New task management system" introduced (TaskCreate, TaskUpdate, TaskList, TaskGet)

The new Task* tools were introduced without hook integration, replacing the hook-compatible TodoWrite system.

Evidence Chain

| Evidence | Source |
|----------|--------|
| TodoWrite hooks work | Issue #6975 - 50+ tests proving TodoWrite triggers PreToolUse |
| TodoWrite available in 2.1.15 | Direct testing - PreToolUse hook fires and blocks |
| TodoWrite unavailable in 2.1.16+ | Direct testing - "No such tool available" |
| Task* introduced in 2.1.16 | Release notes: "Added new task management system" |
| Task* bypasses hooks | Direct testing - no PreToolUse/PostToolUse events |

Request

The new task management system should trigger hooks like the previous TodoWrite system did. Issue #6975 documents extensive work by the community to build hook-based integrations with TodoWrite. That capability was lost in 2.1.16.

Please either:

  1. Add hook support to TaskCreate, TaskUpdate, TaskList, TaskGet
  2. Or re-expose TodoWrite as an agent-callable tool alongside Task*
  3. Or document this as intentional breaking change
cversek · 7 months ago

I welcome more powerful and efficient tools for task management, but Anthropic should not be taking away user control. I've found that by making the TODOs list "sticky" and hard for Claude to "clobber" or erase items is a game-changer for my productivity despite the brutally slow TodoWrite calls with 50+ item lists. Having PreToolUse oversight (and PostToolUse capture) is a key safety mechanism for users who believe that they should own the task list, not the capricious amnesiac agents! Also completed items should not be hidden without the ability to expand them into view. Monitoring this list is one of the best shared cognitive tools for human/AI collaboration and tracking ambitious plans over many compaction cycles. I hope support is planned and coming soon to the twice daily release schedule!

cversek · 7 months ago

Update: Fixed in v2.1.19

I've verified that this regression has been fully resolved in Claude Code v2.1.19.

Test Results (v2.1.19)

| Tool | PreToolUse Hook | PostToolUse Hook |
|------|-----------------|------------------|
| TaskList | ✅ Fires | ✅ Fires |
| TaskUpdate | ✅ Fires | ✅ Fires |
| TaskCreate | ✅ Fires | ✅ Fires |
| TaskGet | ✅ Fires | ✅ Fires |

All four Task* tools now properly trigger both PreToolUse and PostToolUse hooks, restoring:

  • User visibility into task operations
  • Hook-based blocking capability (exit code 2)
  • Event logging for task changes

Thank you for the quick fix! 🎉

---

Feature Request: Task List Expand Keystroke

It would be helpful to have a keyboard shortcut (e.g., Ctrl+T+E) to expand the Task List and show all items including completed tasks. Currently the UI collapses/hides completed items, but for project tracking and audit purposes, being able to quickly toggle full visibility of the complete task history would be valuable.

Halle-Astra · 7 months ago

Are you sure 2.1.19 is ok? In my experience, prompt-based hooks can be triggered but nothing happened. So I come here to look for resolution. And the same prompt-based hooks can be done correctly for TodoWrite.

Halle-Astra · 7 months ago
Are you sure 2.1.19 is ok? In my experience, prompt-based hooks can be triggered but nothing happened. So I come here to look for resolution. And the same prompt-based hooks can be done correctly for TodoWrite.

Since my current version is 2.1.19. So I sure about 2.1.19 still have problems on prompt-based hooks of TaskCreate and TaskUpdate and so on. I've been troubled for a whole day.

github-actions[bot] · 7 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.