claude-code - 💡(How to fix) Fix STDIO MCP servers not re-registered on `claude --resume`, causing `No such tool available: mcp__…`

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…

When a session is resumed with claude --resume <id>, STDIO MCP servers — which are spawned as child processes per claude invocation — die with the prior process and are not reliably re-spawned/re-registered before the agent issues its first tool call. The agent then fails MCP tool calls with No such tool available: mcp__<server>__<tool> and effectively no-ops the turn.

Critically, claude mcp list (the natural pre-flight check) reports the server connection configuration, not the tool catalog the resumed agent process actually sees — so a startup probe cannot detect this. The catalog truth only shows up in the session stream's system init message and in the failing tool call.

Root Cause

When a session is resumed with claude --resume <id>, STDIO MCP servers — which are spawned as child processes per claude invocation — die with the prior process and are not reliably re-spawned/re-registered before the agent issues its first tool call. The agent then fails MCP tool calls with No such tool available: mcp__<server>__<tool> and effectively no-ops the turn.

Critically, claude mcp list (the natural pre-flight check) reports the server connection configuration, not the tool catalog the resumed agent process actually sees — so a startup probe cannot detect this. The catalog truth only shows up in the session stream's system init message and in the failing tool call.

Fix Action

Fix / Workaround

Downstream workaround (for context, not a fix)

RAW_BUFFERClick to expand / collapse

Summary

When a session is resumed with claude --resume <id>, STDIO MCP servers — which are spawned as child processes per claude invocation — die with the prior process and are not reliably re-spawned/re-registered before the agent issues its first tool call. The agent then fails MCP tool calls with No such tool available: mcp__<server>__<tool> and effectively no-ops the turn.

Critically, claude mcp list (the natural pre-flight check) reports the server connection configuration, not the tool catalog the resumed agent process actually sees — so a startup probe cannot detect this. The catalog truth only shows up in the session stream's system init message and in the failing tool call.

Environment

  • Claude Code CLI 2.1.111
  • Linux (also observed under WSL2)
  • STDIO MCP servers launched via uv / npx from a project .mcp.json

Expected

On --resume, STDIO MCP servers declared in the project's .mcp.json are re-spawned and their tool catalog re-registered before the first agent turn, identical to a cold start. Resumed and fresh sessions should expose the same MCP tool catalog.

Actual

A resumed session sometimes has an empty or partial MCP tool catalog. Tool calls no-op with No such tool available: mcp__<server>__<tool>, and/or a type:"system" init message reports the expected STDIO server failed/absent.

Reproduction

  1. Register a STDIO MCP server in .mcp.json (e.g. one launched via uv or npx).
  2. Start a session and confirm mcp__<server>__<tool> is callable.
  3. End the session, then resume it: claude --resume <id> -p "<prompt that calls the MCP tool>".
  4. Observe No such tool available: mcp__<server>__<tool> and/or a system init message reporting the STDIO server absent.

Impact

In an autonomous loop, a resumed iteration that depends on MCP tools no-ops entirely — the agent cannot reach the tools it needs and produces no useful work for that turn.

Downstream workaround (for context, not a fix)

We detect the catalog-loss signature (No such tool available: mcp__, or a system init reporting an expected STDIO server absent) on the post-run stream and retry the loop once with a fresh, non-resumed session, dropping the poisoned session id. This is a harness band-aid; the durable fix belongs in the CLI's --resume path. Happy to share more detail or test a fix.

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

claude-code - 💡(How to fix) Fix STDIO MCP servers not re-registered on `claude --resume`, causing `No such tool available: mcp__…`