[BUG] v2.1.105: ESC during MCP tool call kills MCP server process (regression from v2.1.104)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Pressing ESC to cancel a long-running MCP tool call in v2.1.105 kills the MCP server process entirely. All tools from
that server become unavailable and it shows as "failed" in the /mcp dialog.
What Should Happen?
ESC should cancel the tool call (mark as "rejected by user") while keeping the MCP server alive and all tools
available — which is exactly how v2.1.104 behaves
Error Messages/Logs
"The following MCP servers have disconnected: meshcode-meshcode-self-improve-backend"
"The following deferred tools are no longer available (their MCP server disconnected)"
Steps to Reproduce
- Have any MCP server with a long-running async tool (e.g., a tool that awaits for 60+ seconds)
- Call that tool from Claude Code
- While the tool is running, press ESC to cancel it
- The MCP server process is killed — all tools become unavailable
- /mcp dialog shows the server as failed
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.104
Claude Code Version
2.1.105
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Verified with the exact same MCP server code on both versions:
- v2.1.104: ESC cancels tool, server stays alive ✅
- v2.1.105: ESC cancels tool, server killed ❌
Tested with multiple server code variations (with/without signal handlers, with/without atexit hooks, minimal
mcp.run() only) — all crash on v2.1.105, all survive on v2.1.104.
mcp Python package v1.27.0 (also tested v1.26.0 — same result on v2.1.105).
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗