🟡 🏥 In Practice Published: · 2 min read ·

Anthropic: Claude Code v2.1.217 fixes an MCP memory leak and introduces a 20-concurrent-subagent limit

Terminal icon with the Claude Code logo and the version number 2.1.217 displayed

Anthropic has released Claude Code v2.1.217, the successor to v2.1.216. The new version fixes a memory leak in MCP tool output, adds emoji shortcode autocomplete, introduces security fixes for background session isolation, caps subagent concurrency at 20, disables nested spawning, and now has budget enforcement stop background agents once the limit is reached.

🤖

This article was generated using artificial intelligence from primary sources.

What’s new in Claude Code v2.1.217?

Anthropic has released Claude Code v2.1.217, the successor to version v2.1.216, with a focus on security and long-session stability. Claude Code is Anthropic’s CLI (command-line) coding agent that, via MCP (Model Context Protocol, a standard for connecting AI agents to external tools) and subagents (helper agents the main agent spawns to handle part of a task), autonomously writes, tests, and fixes code.

MCP output memory leak finally fixed

The biggest fix addresses a bug where truncated MCP tool outputs shown to the user in the background still kept the full, untruncated result in memory until the end of the session. In long sessions with many tool calls, this unnecessarily consumed memory even when the displayed output was short. v2.1.217 discards the full result as soon as the truncated version is generated, instead of retaining it until the session closes as v2.1.216 did.

Security fixes and new subagent limits

The version brings two security fixes: background session isolation and closing a workspace-folder escape vulnerability. In addition, subagent concurrency is now capped by default at 20 simultaneous instances, and nested spawning — a situation where one subagent could launch its own subagents — is no longer allowed. Budget enforcement (spend control) now actively stops background agents as soon as the configured spending limit is reached, instead of letting them keep spending past it.

Minor user-experience improvements

Alongside the security fixes, emoji shortcode autocomplete was added to the prompt input — typing a tag like :heart: suggests the matching emoji, and the feature can be disabled if desired. The combination of security patches and stricter subagent concurrency limits makes v2.1.217 primarily a maintenance release focused on the stability of long-running, background agent sessions, unlike v2.1.216, which had no such restrictions.

Frequently Asked Questions

What is Claude Code?
Claude Code is Anthropic's CLI coding agent that, with the help of tools and MCP servers (Model Context Protocol, a standard for connecting AI agents to external tools), autonomously writes, tests, and fixes code.
What is the most important security fix in v2.1.217?
The version fixes a background session isolation vulnerability and the ability to escape the workspace folder, along with capping subagent concurrency at 20 and banning nested subagent spawning.
What was fixed regarding the memory leak?
Previously, truncated MCP tool outputs still internally retained the full, untruncated result in memory until the end of the session; v2.1.217 fixes this and reduces memory consumption during long sessions.

📬 AI news in your inbox

A daily digest built your way — pick topics, sources and cadence. One-click unsubscribe.