claude-code - 💡(How to fix) Fix [BUG] v2.1.105: ESC during MCP tool call kills MCP server process (regression from v2.1.104) [1 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#47724Fetched 2026-04-15 06:44:04
View on GitHub
Comments
1
Participants
1
Timeline
6
Reactions
2
Participants
Timeline (top)
labeled ×5commented ×1

Error Message

Error Messages/Logs

Code Example

"The following MCP servers have disconnected: meshcode-meshcode-self-improve-backend"                                
  "The following deferred tools are no longer available (their MCP server disconnected)"
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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

  1. Have any MCP server with a long-running async tool (e.g., a tool that awaits for 60+ seconds)
  2. Call that tool from Claude Code
  3. While the tool is running, press ESC to cancel it
  4. The MCP server process is killed — all tools become unavailable
  5. /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).

extent analysis

TL;DR

Downgrade to version 2.1.104 to avoid the issue where pressing ESC kills the MCP server process.

Guidance

  • Verify that the issue is specific to version 2.1.105 by testing with the same MCP server code on version 2.1.104.
  • Check if the problem persists with different server code variations, such as with or without signal handlers or atexit hooks.
  • Consider testing with a minimal mcp.run() setup to isolate the issue.
  • Review the changes between versions 2.1.104 and 2.1.105 to identify potential causes of the regression.

Example

No code snippet is provided as the issue does not specify a particular code change.

Notes

The issue seems to be a regression introduced in version 2.1.105, and downgrading to version 2.1.104 resolves the problem. However, it is essential to investigate the changes between the two versions to identify the root cause of the issue.

Recommendation

Apply workaround: Downgrade to version 2.1.104, as it is confirmed to work correctly and the issue is specific to version 2.1.105.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING