Claude Code v2.1.221 ·
mcp_tool hooks require a live MCP session and refuse cleanly
MCP tool hooks now fail fast with a warning instead of hanging when no session exists.
You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
0Signal: worth watching, 1 to 5
MCPArea: what it touches
ImprovementsKind: in v2.1.221,
ImprovementsSection of the release
What
The mcp_tool hook path validates its preconditions before calling instead of attempting a call that cannot succeed.
Details
- Checks both that the named server is connected or cached and that an MCP session is wired.
- On failure it returns a structured result with a warning log rather than throwing or hanging.
- Calls go through the session-level caller with a timeout capped at the MCP timeout and a "mcp_tool hook" context label.
Evidence
Hooks: mcp_tool hook skipped
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
See this entry in the whole of v2.1.221 →