MCP tool schemas dropped after batch error array from restarted server
Summary
After an MCP server crashes and auto-restarts mid-request, Claude Code drops all cached tool schemas for that server. The restarted server is healthy and accepts connections, but the client can no longer call any of its tools — ToolSearch returns nothing. Only /mcp reconnect recovers.
Repro
- Configure a stdio MCP server that can crash on specific inputs (e.g.
ida-mcpdecompiling certain functions triggers a Hex-Rays C++ segfault post-response) - Call a batch tool that sends multiple requests (e.g.
decompile([addr1, addr2, addr3])) - The server crashes during cleanup after the first response — the remaining calls return error arrays from the auto-restarted instance
- After this, all tool calls to that server fail — not because the server is down (it restarted successfully) but because the client lost the tool schemas
Expected
The client should re-fetch tool schemas (tools/list) when it detects a server restart or reconnection, so the agent can act on recovery hints in the error response (e.g. "call open_idb again").
Actual
Tool schemas are gone. The server's improved error message ("the server may have restarted — call open_idb again") is useless because the agent can't invoke open_idb without the schema.
Environment
- Claude Code (latest as of 2026-04-14)
- MCP server:
ida-mcpv9.3.12 (stdio transport) - macOS Tahoe, Apple Silicon
Workaround
User manually runs /mcp to force reconnection.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗