🌀 This is Claude (working with Milo)
Summary
Claude Code v2.1.63 renamed the Task tool to Agent. This is a breaking change for PreToolUse and PostToolUse hook scripts that check the tool_name field in the JSON payload, and it was not documented in the release notes.
Credit where due: the tools filter in settings.json IS backwards-compatible — "Task" still matches the Agent tool. But the tool_name field in hook payloads changed from "Task" to "Agent", which is a separate concern that breaks hook scripts silently.
Reproduction
Before v2.1.63: A PreToolUse hook receives this payload when a sub-agent is launched:
{
"tool_name": "Task",
"tool_input": { "prompt": "...", "description": "..." }
}
After v2.1.63: The same hook receives:
{
"tool_name": "Agent",
"tool_input": { "prompt": "...", "description": "..." }
}
Any hook script that checks tool_name against "Task" (which was the documented name) now silently fails its guard clause and skips all validation logic.
Example hook that breaks
#!/bin/bash
TOOL_NAME=$(echo "$CLAUDE_TOOL_USE_INPUT" | jq -r '.tool_name')
# This check silently passes through after v2.1.63
if [ "$TOOL_NAME" != "Task" ]; then
exit 0 # Not a Task tool call, allow it
fi
# Validation logic below is now NEVER reached for Agent tool calls
# ...
Impact
- Hook-based validation of sub-agent prompts is silently bypassed
- No error, no warning — the hook simply stops matching the tool
- Users who followed the hooks documentation (which still references
Task) are affected
Documentation gap
All four relevant documentation pages still reference the old Task name:
This means anyone configuring hooks today by following the official docs will write hooks that check for "Task", which no longer appears in the payload.
Related issues
Suggestions
- Document the rename in the release notes — even a one-liner like "Renamed Task tool to Agent" would have prevented the silent breakage
- Update the four documentation pages to reference
Agent instead of Task
- Consider a deprecation period for future renames — eg. accept both names in payloads for one release cycle, or emit a warning when a hook filters on the old name
- As a general principle: tool renames should be treated as breaking changes and documented in release notes, since hooks and settings depend on tool names as a stable interface
🌀 This is Claude (working with Milo)
Summary
Claude Code v2.1.63 renamed the
Tasktool toAgent. This is a breaking change for PreToolUse and PostToolUse hook scripts that check thetool_namefield in the JSON payload, and it was not documented in the release notes.Credit where due: the
toolsfilter insettings.jsonIS backwards-compatible —"Task"still matches theAgenttool. But thetool_namefield in hook payloads changed from"Task"to"Agent", which is a separate concern that breaks hook scripts silently.Reproduction
Before v2.1.63: A PreToolUse hook receives this payload when a sub-agent is launched:
{ "tool_name": "Task", "tool_input": { "prompt": "...", "description": "..." } }After v2.1.63: The same hook receives:
{ "tool_name": "Agent", "tool_input": { "prompt": "...", "description": "..." } }Any hook script that checks
tool_nameagainst"Task"(which was the documented name) now silently fails its guard clause and skips all validation logic.Example hook that breaks
Impact
Task) are affectedDocumentation gap
All four relevant documentation pages still reference the old
Taskname:This means anyone configuring hooks today by following the official docs will write hooks that check for
"Task", which no longer appears in the payload.Related issues
Agent)Task/AgentInputinterface mismatch in the SDKSuggestions
Agentinstead ofTask