Task* tools (TaskCreate, TaskUpdate, TaskList, TaskGet) bypass PreToolUse/PostToolUse hooks - user control regression
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
- No interception: Users cannot use PreToolUse hooks to approve/deny task modifications
- No audit trail: PostToolUse hooks cannot log task changes for forensics
- Protection bypass: Any hook-based protection against unauthorized task modification is ineffective
- State divergence: External systems monitoring via hooks see stale state
Reproduction
- Install PreToolUse hook that logs all tool invocations
- Use
TaskCreateto add a new task - Use
TaskUpdateto modify task status - Check hook logs - no events for Task* tools
- 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
TodoWriteis 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
- **Add hook support to Task tools* - Fire PreToolUse/PostToolUse for TaskCreate, TaskUpdate, etc.
- Or expose TodoWrite to agents - Allow agents to use the hook-observable path
- Or document the limitation - If intentional, document that Task* tools are unobservable by design
8 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
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:
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+.
Update 2: Root Cause Identified in v2.1.16 Release Notes
The v2.1.16 release notes explicitly state:
This confirms:
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:
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!
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:
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.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.
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.