{"version":"2.1.330","anchor":"subagent-mcp-connections-ref-counted-before-cleanup","canonical_anchor":"subagent-mcp-connections-ref-counted-before-cleanup","heading":"A subagent no longer closes MCP connections that something else is still using","tier":"notice","area":"MCP","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.330\/e\/subagent-mcp-connections-ref-counted-before-cleanup","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.330","markdown":"### A subagent no longer closes MCP connections that something else is still using\n\nWhen a subagent finishes, its MCP server connections are closed only if no other subagent and not the main session still uses them\n\n**What**\n\nA subagent is a helper Claude Code starts to work on part of a task. MCP servers are outside tools Claude Code connects to. When a subagent finishes, Claude Code tidies up the MCP connections it opened. It now closes a connection only when both of these are true:\n\n- No other subagent is using the same connection.\n\n- The main session's own list of connections does not hold it.\n\nBefore, Claude Code closed any connection the subagent had newly opened, without these checks.\n\n**Why**\n\nOne subagent finishing can no longer close an MCP connection that another subagent or the main session is still relying on.\n\n- Area: MCP\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}