MCP tools never loaded — Haiku title-generation model check blocks all custom MCP tool loading regardless of transport, proxy, or ENABLE_TOOL_SEARCH setting
Bug Description
MCP server tools (both stdio and HTTP transport) connect successfully but are never included in API requests. The debug log shows the Haiku model used for session title generation is evaluated for tool_reference support, and when it fails (Haiku doesn't support tool_reference), ALL MCP tool loading is blocked for the entire session — even when the main conversation model is Opus 4.6 or Sonnet 4.6.
This happens regardless of whether ANTHROPIC_BASE_URL is set. Tested with and without a custom proxy — same result.
Built-in MCP servers like kubernetes-mcp-server work fine in the same session.
Environment
- Claude Code v2.1.92 (CLI)
- macOS Darwin 25.4.0
- Claude Max subscription
- Tested with and without
ANTHROPIC_BASE_URL ENABLE_TOOL_SEARCH=falsein settings.json env
Reproduction Steps
- Configure a custom MCP server (any transport works — stdio, HTTP, or stdio via mcp-remote):
``bash``
# Direct HTTP:
claude mcp add --transport http todoist-mcp https://my-server.example.com/mcp
# Or stdio:
claude mcp add todoist-mcp -- npx mcp-remote https://my-server.example.com/mcp
- Start a new session:
claude --debug
- Ask the model to use any tool from the custom MCP server
Also reproduces with ANTHROPIC_BASE_URL="" (direct Anthropic API):
ANTHROPIC_BASE_URL="" claude --debug
Expected Behavior
With ENABLE_TOOL_SEARCH=false, all MCP tools should load upfront into the API request, regardless of which model is used for background tasks like title generation.
Actual Behavior
- MCP server connects successfully:
Successfully connected (transport: stdio) in 1005ms - Server reports tools available:
hasTools: true - But the Haiku model check fires:
Tool search disabled for model 'claude-haiku-4-5-20251001': model does not support tool_reference blocks - Then:
Tool search disabled: ToolSearchTool is not available (may have been disallowed via disallowedTools) - Zero
Dynamic tool loadinglines appear — tools are never sent to the API - Model says "tools aren't available"
Debug Evidence
From claude --debug log (session on Opus 4.6 with ENABLE_TOOL_SEARCH=false, NO custom proxy):
[DEBUG] [ToolSearch:optimistic] mode=standard, ENABLE_TOOL_SEARCH=false, result=false
[DEBUG] MCP server "todoist-mcp": Successfully connected (transport: stdio) in 1005ms
[DEBUG] MCP server "todoist-mcp": Connection established with capabilities: {"hasTools":true,...}
[DEBUG] [MCP] Server "todoist-mcp" connected with subscribe=false
[DEBUG] Tool search disabled for model 'claude-haiku-4-5-20251001': model does not support tool_reference blocks. This feature is only available on Claude Sonnet 4+, Opus 4+, and newer models.
[DEBUG] Tool search disabled: ToolSearchTool is not available (may have been disallowed via disallowedTools).
No Dynamic tool loading lines appear anywhere in the log. The 13 registered tools are never included in any API request.
What I've Tried
All combinations produce the same result:
| Transport | ENABLE_TOOL_SEARCH | Model | ANTHROPIC_BASE_URL | Result |
|-----------|-------------------|-------|--------------------|--------|
| HTTP (streamable-http) | false | Opus 4.6 | Custom proxy | Tools not loaded |
| HTTP (streamable-http) | true | Sonnet 4.6 | Custom proxy | Tools found by search but not callable |
| HTTP (streamable-http) | auto:2 | Sonnet 4.6 | Custom proxy | Tools found by search but not callable |
| stdio (mcp-remote) | false | Opus 4.6 | Custom proxy | Tools not loaded |
| stdio (mcp-remote) | false | Sonnet 4.6 | Custom proxy | Tools not loaded |
| stdio (mcp-remote) | false | Opus 4.6 | Empty (direct API) | Tools not loaded |
| HTTP (direct) | false | Opus 4.6 | Empty (direct API) | Tools not loaded |
| HTTP (direct) | false | Opus 4.6 | Custom proxy | Tools not loaded |
Every combination of transport (HTTP streamable-http, stdio via mcp-remote, direct stdio), model (Opus 4.6, Sonnet 4.6), proxy (custom, none), and ENABLE_TOOL_SEARCH (false, true, auto:2) produces the same result. kubernetes-mcp-server (also stdio, ~20 tools) works perfectly in the same session.
Root Cause Hypothesis
The Haiku model used for session title generation (source=generate_session_title) is being evaluated for tool_reference block support. When this check fails, it sets a session-wide flag that prevents ALL non-built-in MCP tools from loading — even though the main conversation model (Opus/Sonnet) supports tool_reference, and even when ENABLE_TOOL_SEARCH=false should bypass tool_reference entirely.
Possibly Related Issues
- #40314 — HTTP MCP tools not deferred by ToolSearch
- #39279 — ToolSearch threshold scaling on 1M context
- #30920 — defer_loading + cache_control conflict
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗