[Bug] Stop hook evaluator API call fails with 400 when transcript references deferred MCP tool
Bug Description
Title: Stop hook evaluator API call fails with 400 when transcript references a deferred/dynamically-loaded MCP tool
Body:
Description
When a session uses a deferred MCP tool (one loaded dynamically via ToolSearch, e.g.mcp__claude-in-chrome__computer), the Stop hook's internal "hook evaluator" API call
fails with a 400 error:
Stop hook error: Hook evaluator API error: API Error: 400 Tool reference
'mcp__claude-in-chrome__computer' not found in available tools
Root cause (as far as I could trace it)
The Stop hook fires an internal API call that includes the session transcript. The
transcript contains a tool_use block referencing the deferred tool (loaded mid-session
via ToolSearch), but the tools array sent with that internal evaluator request doesn't
appear to include schemas for tools that were only loaded dynamically. Since the
Anthropic API requires every tool referenced in tool_use blocks to have a matching
entry in the request's tools array, the call is rejected.
What it's NOT caused by
Confirmed via full audit of local hook configuration:
- No installed plugin (claude-mem, hookify, or custom project hooks) references this
tool name anywhere in its hook scripts or config.
- The
hookifyplugin isn't even enabled ininstalled_plugins.json. - Project-level
.claude/settings.jsonStop hooks don't reference any chrome/browser tools.
Impact
Cosmetic/non-blocking — doesn't appear to interrupt actual session work, but surfaces a
confusing error message after any session that used Claude in Chrome (or presumably any
other deferred MCP tool).
Environment
- Claude Code CLI, macOS (Darwin 25.5.0)
- Plugins: claude-mem@thedotmack 13.11.0, code-simplifier@claude-plugins-official 1.0.0
Environment Info
- Platform: darwin
- Terminal: ghostty
- Version: 2.1.217
- Feedback ID: 49a3e405-8cfc-4edb-bfa2-2b3b15db68a3
Errors
[{"error":"Error: Unable to render server tool block: server_tool_use (tool_search_tool_regex)\n at jna (/$bunfs/root/src/entrypoints/cli.js:14828:10894)\n at ms (/$bunfs/root/src/entrypoints/cli.js:3229:21375)\n at Kv (/$bunfs/root/src/entrypoints/cli.js:3229:40475)\n at Nj (/$bunfs/root/src/entrypoints/cli.js:3229:51402)\n at TJ (/$bunfs/root/src/entrypoints/cli.js:3229:89075)\n at che (/$bunfs/root/src/entrypoints/cli.js:3229:88021)\n at lhe (/$bunfs/root/src/entrypoints/cli.js:3229:87841)\n at ahe (/$bunfs/root/src/entrypoints/cli.js:3229:84100)\n at xt (/$bunfs/root/src/entrypoints/cli.js:3229:6676)\n at Le (/$bunfs/root/src/entrypoints/cli.js:3229:5102)","timestamp":"2026-07-22T12:07:43.202Z"},{"error":"Error: Unable to render message type: tool_search_tool_result\n at jna (/$bunfs/root/src/entrypoints/cli.js:14828:10992)\n at ms (/$bunfs/root/src/entrypoints/cli.js:3229:21375)\n at Kv (/$bunfs/root/src/entrypoints/cli.js:3229:40475)\n at Nj (/$bunfs/root/src/entrypoints/cli.js:3229:51402)\n at TJ (/$bunfs/root/src/entrypoints/cli.js:3229:89075)\n at che (/$bunfs/root/src/entrypoints/cli.js:3229:88021)\n at lhe (/$bunfs/root/src/entrypoints/cli.js:3229:87841)\n at ahe (/$bunfs/root/src/entrypoints/cli.js:3229:84100)\n at xt (/$bunfs/root/src/entrypoints/cli.js:3229:6676)\n at Le (/$bunfs/root/src/entrypoints/cli.js:3229:5102)","timestamp":"2026-07-22T12:07:43.202Z"},{"error":"Error: Unable to render server tool block: server_tool_use (tool_search_tool_regex)\n at jna (/$bunfs/root/src/entrypoints/cli.js:14828:10894)\n at ms (/$bunfs/root/src/entrypoints/cli.js:3229:21375)\n at Kv (/$bunfs/root/src/entrypoints/cli.js:3229:40475)\n at Nj (/$bunfs/root/src/entrypoints/cli.js:3229:51402)\n at TJ (/$bunfs/root/src/entrypoints/cli.js:3229:89075)\n at che (/$bunfs/root/src/entrypoints/cli.js:3229:88021)\n at lhe (/$bunfs/root/src/entrypoints/cli.js:3229:87841)\n at ahe (/$bunfs/root/src/entrypoints/cli.js:3229:84100)\n at xt (/$bunfs/root/src/entrypoints/cli.js:3229:6676)\n at Le (/$bunfs/root/src/entrypoints/cli.js:3229:5102)","timestamp":"2026-07-22T12:07:43.202Z"},{"error":"Error: Unable to render message type: tool_search_tool_result\n at jna (/$bunfs/root/src/entrypoints/cli.js:14828:10992)\n at ms (/$bunfs/root/src/entrypoints/cli.js:3229:21375)\n at Kv (/$bunfs/root/src/entrypoints/cli.js:3229:40475)\n at Nj (/$bunfs/root/src/entrypoints/cli.js:3229:51402)\n at TJ (/$bunfs/root/src/entrypoints/cli.js:3229:89075)\n at che (/$bunfs/root/src/entrypoints/cli.js:3229:88021)\n at lhe (/$bunfs/root/src/entrypoints/cli.js:3229:87841)\n at ahe (/$bunfs/root/src/entrypoints/cli.js:3229:84100)\n at xt (/$bunfs/root/src/entrypoints/cli.js:3229:6676)\n at Le (/$bunfs/root/src/entrypoints/cli.js:3229:5102)","timestamp":"2026-07-22T12…
Note: Content was truncated.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗