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
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗