Claude Code v2.1.50: Major Memory Optimizations and Worktree Isolation
Claude Code v2.1.50 brings significant memory leak fixes, worktree isolation support, and enhanced LSP configuration for power users.
February 21, 2026 • 10 min read • By ClaudeWorld
Claude Code v2.1.50 delivers a substantial update focused on performance optimization and developer workflow improvements. This release addresses multiple memory leaks that were affecting long-running sessions and introduces powerful new features for advanced users.
What’s New
Memory Management Overhaul
This release includes comprehensive memory leak fixes that significantly improve performance during extended coding sessions:
- Fixed memory leaks in agent teams where completed teammate tasks weren’t garbage collected
- Resolved memory leaks in LSP diagnostic data that caused unbounded growth
- Fixed task output and state object retention issues
- Improved memory usage by clearing internal caches and large tool results after processing
- Added file history snapshot capping to prevent unbounded memory growth
Worktree Isolation Support
A major new feature for advanced Git workflows:
- Added support for
isolation: worktreein agent definitions - New
WorktreeCreateandWorktreeRemovehook events for custom VCS setup - Agents can now run in isolated git worktrees declaratively
Enhanced LSP and Configuration
- Added
startupTimeoutconfiguration for LSP servers - Improved startup performance for headless mode by deferring UI imports
- Fixed native module loading on older glibc systems (RHEL 8 compatibility)
CLAUDE_CODE_SIMPLE Mode Improvements
- Now fully strips skills, session memory, custom agents, and CLAUDE.md token counting
- Disables MCP tools, attachments, hooks, and CLAUDE.md loading for minimal experience
Context Window Enhancement
- Opus 4.6 (fast mode) now includes full 1M context window support
- Added
CLAUDE_CODE_DISABLE_1M_CONTEXTenvironment variable for opt-out
Additional Improvements
- New
claude agentsCLI command to list configured agents - Added
/extra-usagecommand support in VS Code sessions - Fixed session visibility issues with symlinks
- Improved session data persistence on SSH disconnect
- Fixed MCP tool discovery with launch arguments
- Resolved
/mcp reconnectfreezing with invalid server names
How to Update
To update to Claude Code v2.1.50:
- Via Package Manager: Use your preferred package manager to update
- Manual Download: Visit the release page and download the appropriate binary
- Verify Installation: Run
claude --versionto confirm the update
Existing configurations should work seamlessly with this release.