2.1.50 isolation untested · changelog-derived

Claude Code 2.1.50

Declarative `isolation: worktree` in agent definitions (plus paired WorktreeCreate/WorktreeRemove hooks) lets subagents run in isolated git worktrees automatically — the key new fan-out orchestration primitive in 2.1.50. The rest is predominantly memory-leak hardening.

6 new primitives 0 workflow recipes 19 fixes

New primitives

isolation: worktree (agent definitions)capability

Agent definitions can declaratively request running in an isolated git worktree, giving each agent its own checkout for safe parallel fan-out without manual worktree management.

Added support for `isolation: worktree` in agent definitions, allowing agents to declaratively run in isolated git worktrees.
WorktreeCreate / WorktreeRemove hookshook

Two new hook events fire when agent worktree isolation creates or removes a worktree, enabling custom VCS setup/teardown (deps install, env priming, cleanup) around isolated agent runs.

Added `WorktreeCreate` and `WorktreeRemove` hook events, enabling custom VCS setup and teardown when agent worktree isolation creates or removes worktrees.
claude agents (CLI)command

New CLI subcommand that lists all configured agents.

Added `claude agents` CLI command to list all configured agents
CLAUDE_CODE_DISABLE_1M_CONTEXTenv-var

Environment variable to disable the 1M context window support.

Added `CLAUDE_CODE_DISABLE_1M_CONTEXT` environment variable to disable 1M context window support
startupTimeout (LSP config)setting

New configuration option to set the startup timeout for LSP servers.

Added support for `startupTimeout` configuration for LSP servers
/extra-usage in VS Codecommand

The /extra-usage command is now supported within VS Code sessions, extending that command to the VSCode surface.

VSCode: Added `/extra-usage` command support in VS Code sessions

Agentic relevance

2.1.50 advances the agent-orchestration frontier mainly through declarative `isolation: worktree` plus WorktreeCreate/WorktreeRemove hooks, which turn safe parallel subagent fan-out into a first-class, config-driven capability instead of a hand-rolled worktree dance. Paired with `claude agents` for fleet visibility, it tightens the multi-agent control surface, while the heavy memory-leak hardening makes long-running orchestration sessions materially more durable.

Hardening & fixes (19)

  • Fixed a bug where resumed sessions could be invisible when the working directory involved symlinks, because the session storage path was resolved at different times during startup. Also fixed session data loss on SSH disconnect by flushing session data before hooks and analytics in the graceful shutdown sequence.
  • Linux: Fixed native modules not loading on systems with glibc older than 2.30 (e.g., RHEL 8)
  • Fixed memory leak in agent teams where completed teammate tasks were never garbage collected from session state
  • Fixed `CLAUDE_CODE_SIMPLE` to fully strip down skills, session memory, custom agents, and CLAUDE.md token counting
  • Fixed `/mcp reconnect` freezing the CLI when given a server name that doesn't exist
  • Fixed memory leak where completed task state objects were never removed from AppState
  • `CLAUDE_CODE_SIMPLE` mode now also disables MCP tools, attachments, hooks, and CLAUDE.md file loading for a fully minimal experience.
  • Fixed bug where MCP tools were not discovered when tool search is enabled and a prompt is passed in as a launch argument
  • Improved memory usage during long sessions by clearing internal caches after compaction
  • Improved memory usage during long sessions by clearing large tool results after they have been processed
  • Fixed a memory leak where LSP diagnostic data was never cleaned up after delivery, causing unbounded memory growth in long sessions
  • Fixed a memory leak where completed task output was not freed from memory, reducing memory usage in long sessions with many tasks
  • Improved startup performance for headless mode (`-p` flag) by deferring Yoga WASM and UI component imports
  • Fixed prompt suggestion cache regression that reduced cache hit rates
  • Fixed unbounded memory growth in long sessions by capping file history snapshots
  • Opus 4.6 (fast mode) now includes the full 1M context window
  • Fixed memory leak where TaskOutput retained recent lines after cleanup
  • Fixed memory leak in CircularBuffer where cleared items were retained in the backing array
  • Fixed memory leak in shell command execution where ChildProcess and AbortController references were retained after cleanup

Raw changelog

## 2.1.50

- Added support for `startupTimeout` configuration for LSP servers
- Added `WorktreeCreate` and `WorktreeRemove` hook events, enabling custom VCS setup and teardown when agent worktree isolation creates or removes worktrees.
- Fixed a bug where resumed sessions could be invisible when the working directory involved symlinks, because the session storage path was resolved at different times during startup. Also fixed session data loss on SSH disconnect by flushing session data before hooks and analytics in the graceful shutdown sequence.
- Linux: Fixed native modules not loading on systems with glibc older than 2.30 (e.g., RHEL 8)
- Fixed memory leak in agent teams where completed teammate tasks were never garbage collected from session state
- Fixed `CLAUDE_CODE_SIMPLE` to fully strip down skills, session memory, custom agents, and CLAUDE.md token counting
- Fixed `/mcp reconnect` freezing the CLI when given a server name that doesn't exist
- Fixed memory leak where completed task state objects were never removed from AppState
- Added support for `isolation: worktree` in agent definitions, allowing agents to declaratively run in isolated git worktrees.
- `CLAUDE_CODE_SIMPLE` mode now also disables MCP tools, attachments, hooks, and CLAUDE.md file loading for a fully minimal experience.
- Fixed bug where MCP tools were not discovered when tool search is enabled and a prompt is passed in as a launch argument
- Improved memory usage during long sessions by clearing internal caches after compaction
- Added `claude agents` CLI command to list all configured agents
- Improved memory usage during long sessions by clearing large tool results after they have been processed
- Fixed a memory leak where LSP diagnostic data was never cleaned up after delivery, causing unbounded memory growth in long sessions
- Fixed a memory leak where completed task output was not freed from memory, reducing memory usage in long sessions with many tasks
- Improved startup performance for headless mode (`-p` flag) by deferring Yoga WASM and UI component imports
- Fixed prompt suggestion cache regression that reduced cache hit rates
- Fixed unbounded memory growth in long sessions by capping file history snapshots
- Added `CLAUDE_CODE_DISABLE_1M_CONTEXT` environment variable to disable 1M context window support
- Opus 4.6 (fast mode) now includes the full 1M context window
- VSCode: Added `/extra-usage` command support in VS Code sessions
- Fixed memory leak where TaskOutput retained recent lines after cleanup
- Fixed memory leak in CircularBuffer where cleared items were retained in the backing array
- Fixed memory leak in shell command execution where ChildProcess and AbortController references were retained after cleanup