Claude Code Updates: Fixes Memory Leaks and Limits Subagents
Anthropic's CLI tool Claude Code received a series of dense engineering updates, focusing on resolving long-session performance bottlenecks and imposing security and resource limits on subagent mechanisms. These updates significantly improve the tool's stability and system security.
Confirmed
Performance Optimization and Experience Improvements
According to @AlexKim, version 2.1.208 successfully fixed memory leaks, reducing the size of long text logs by 79 times and increasing the speed of tool calls in MCP-intensive sessions by 7 times, effectively alleviating pain points like long-session lag. In version 2.1.217, as described by @ClaudeCodeLog, the system introduced a ripgrep-based Grep tool for faster and more accurate search results, increased the installation package size by 222.6 kB, and removed the TESTENABLESESSIONPERSISTENCE environment variable. Additionally, the new version added Slack-like emoji shortcode autocomplete.
Security and Subagent Limits
To prevent resource runaway, version 2.1.217 introduced important restrictions on subagent behavior. According to @ClaudeCodeLog and @sidjustice, the system now limits the number of concurrently running subagents to 20 by default (developers can override this via an environment variable). Meanwhile, by default, subagents can no longer spawn nested subagents; enabling this requires setting CLAUDECODEMAXSUBAGENTSPAWNDEPTH, an action aimed at enhancing overall system security.
2026-07-22 ~ 2026-07-22 · 7 related posts
Primary sources
- [source] Claude Code Updates: Memory Leak Fixes and 79x Smaller Transcripts — AlexKim · 2026-07-22
- AI Coding Tool Update: Memory Leaks Fixed, Long Session Stalls Resolved — AlexKim · 2026-07-22
- Claude Code Update: Introduces ripgrep Search and Limits Concurrent Subagents — ClaudeCodeLog · 2026-07-22
- [source] Claude Code CLI Update: Caps Concurrent Subagents and Fixes Memory Leak — ClaudeCodeLog · 2026-07-22
- Claude Code 2.1.217 adds CLI cleanup, smarter grep docs and more prompt tokens — ClaudeCodeLog · 2026-07-22
- [source] Claude Code Update: Disables Nested Subagents by Default — sidjustice_ · 2026-07-22
- Claude Code Update: Slack-style Emoji Shortcodes Now Supported — EricBuess · 2026-07-22