{"version":"2.1.283","anchor":"stdio-mcp-servers-that-never-connected-are-terminated-on-exi","canonical_anchor":"stdio-mcp-servers-that-never-connected-are-terminated-on-exi","heading":"MCP servers still connecting when Claude Code exits are shut down and reported as shutting down","tier":"notice","area":"MCP","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.283\/e\/stdio-mcp-servers-that-never-connected-are-terminated-on-exi","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.283","markdown":"### MCP servers still connecting when Claude Code exits are shut down and reported as shutting down\n\nOn exit, still-connecting stdio MCP servers are stopped, new connections are skipped, and late failures report SHUTTING_DOWN instead of real errors\n\n**What**\n\nMCP servers are outside programs that give Claude extra tools. A stdio server is one Claude Code starts itself as a child process on your machine. This release changes what happens to servers that are still connecting when you quit:\n\n- Stdio servers that never connected are stopped on exit. Claude Code sends SIGINT, then SIGTERM, then SIGKILL (increasingly forceful stop signals), waiting between each. On Windows it ends the server's whole process tree instead.\n\n- Once a server connects, this exit-time cleanup is handed over through `handOffExitCleanup()`. Both regular and IDE server connections do this.\n\n- If the cleanup cannot be set up because the SDK no longer exposes the child process, Claude Code throws an error instead of silently losing it.\n\n- While Claude Code is shutting down, new server processes are not started and connections are skipped with \"Skipping connection (Claude Code is shutting down)\".\n\n- A connection that fails or finishes after shutdown has begun is dropped and its client closed. The server is marked failed with \"Claude Code is shutting down\" and error code `SHUTTING_DOWN`, which is now a known error code. It does not go through normal error handling, and the server's error output is not logged.\n\n**Why**\n\nQuitting while servers are starting should no longer leave stray MCP server processes running, and should no longer show misleading \"MCP server failed\" errors for servers that were simply cut off by the exit.\n\n- Area: MCP\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 1\/5"}