Blocking a web fetch via a hook now tells Claude that's the only fetch route, so it stops retrying.
What's wrong with this entry?
If a PreToolUse hook denies a Task call that targets the built-in web-fetch agent, and the session has no direct WebFetch tool available, the error returned to Claude now appends a paragraph saying this is the only route to fetching web pages and that it should tell the user rather than retry.
- The added text also describes how a hook can exempt this case, by matching on
tool_input.subagent_type. - It notes the caveat that matching on that name would also let through a project, user or plugin agent defined under the same name.
- Only appended when there is no separate WebFetch tool in the session.
so while this hook blocks it there is no other way to fetch them. If the page is required, tell the user;
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
-
v2.1.234
SessionEnd hooks lose the
bypass_permissions_disabledreasonBoth mention hook
-
v2.1.236
Hooks and Ctrl-C go quiet once shutdown has started
Both mention hook
-
v2.1.236
Shutdown seals transcript writes and gives SessionEnd hooks more time
Both mention hook