news

Claude Code v2.1.50: Worktree Hooks, Agent Memory Overhaul, Opus 4.6 Gets 1M Context

AI Tools Hub
#Claude Code #Anthropic #release notes #bug fixes #memory management #agents

Anthropic ships Claude Code v2.1.50 with WorktreeCreate/WorktreeRemove hook events, declarative worktree isolation in agent definitions, a fix for session data loss on SSH disconnect, a native module compatibility fix for older glibc Linux systems, an avalanche of memory leak fixes targeting long-running sessions, and Opus 4.6 fast mode now supporting the full 1M context window.

Anthropic published Claude Code v2.1.50 to npm on February 20, 2026 (UTC), approximately 24 hours after v2.1.49. The release ships roughly 26 changes, with memory management improvements dominating the changelog: at least nine separate memory leaks across long-running sessions, agent teams, LSP servers, and shell execution are addressed in a single release. The update also introduces new worktree lifecycle hooks, a declarative isolation option in agent definitions, a Linux compatibility fix for older enterprise distributions, and 1M context support for Opus 4.6 fast mode.

Worktree Lifecycle Hooks

Two new hook events — WorktreeCreate and WorktreeRemove — fire when agent worktree isolation creates or removes a git worktree. This gives teams a clean integration point for custom VCS setup and teardown scripts that need to stay aligned with agent isolation boundaries. CI systems, monorepo setups with custom branch conventions, or deployments that need to register worktrees with external tooling all stand to benefit.

Declarative Worktree Isolation in Agent Definitions

Agent definition files can now include isolation: worktree to declare that the agent should run inside an isolated git worktree. Previously, achieving isolation required external configuration or wrapper scripts. The declarative form keeps isolation policy colocated with the agent definition itself, making it easier to audit and reproduce.

SSH Disconnect No Longer Causes Session Data Loss

When an SSH connection drops, Claude Code’s graceful shutdown sequence now flushes session data before running hooks and analytics. Previously, hooks and analytics could race ahead and exit before session data was written, silently discarding session history. Users on remote development setups over SSH will find their session state preserved through unexpected disconnections.

A startup path resolution inconsistency caused sessions to become invisible in the resume picker when the working directory included symlinks. The session storage path was resolved at different points during initialization, producing mismatched keys. This is fixed in v2.1.50.

Linux: Native Module Fix for Old glibc Systems

Native modules failed to load on Linux systems with glibc versions older than 2.30 — a threshold that excludes RHEL 8 and comparable enterprise distributions. This is now fixed, broadening Claude Code’s compatibility with the kind of locked-down Linux environments common in regulated industries.

claude agents Command

A new claude agents CLI command lists all configured agents. Previously, there was no direct way to inspect registered agents from the terminal; users had to navigate config files manually. This is a small ergonomic addition but meaningful for teams managing more than a handful of agent definitions.

CLAUDE_CODE_SIMPLE Gets a Deeper Simplification

The CLAUDE_CODE_SIMPLE environment variable now strips far more than before. In addition to the previous reductions, v2.1.50 disables MCP tools, attachments, hooks, CLAUDE.md file loading, skills, session memory, custom agents, and CLAUDE.md token counting. The result is a fully minimal execution environment with drastically reduced token overhead — well-suited for CI pipelines or cost-controlled scripted use cases.

Startup Performance: Deferred Yoga WASM and UI Imports in Headless Mode

The -p (non-interactive) flag now defers Yoga WASM and UI component imports until they are actually needed. Since headless mode never renders a terminal UI, these imports previously ran unconditionally at startup and added avoidable latency. Cold start time for scripted and CI usage is reduced.

Opus 4.6 Fast Mode Now Supports 1M Context

Opus 4.6 in fast mode gains the full 1M token context window in v2.1.50. Sonnet 4.6 received 1M context support in v2.1.49; this extends the same capability to the Opus tier.

Additionally, a new CLAUDE_CODE_DISABLE_1M_CONTEXT environment variable allows operators to explicitly opt out of the 1M context window. This is useful for cost management or environments where context length needs to be bounded by policy rather than trust.

VS Code: /extra-usage Command

The /extra-usage command is now available inside VS Code sessions. It was previously terminal-only. VS Code extension users can now check additional token usage information without switching to a terminal.

Memory Management: Nine Fixes Across the Stack

v2.1.50 addresses a cluster of memory leaks that compounded during long sessions. Independently:

  • Agent team task objects were never removed from AppState after completion, causing unbounded growth in sessions running many tasks in parallel.
  • LSP diagnostic data accumulated without bound after delivery — each diagnostic was kept in memory indefinitely rather than being cleaned up post-delivery.
  • Completed task output (TaskOutput) was retained in memory after tasks finished.
  • TaskOutput “recent lines” buffer continued holding data after a cleanup pass.
  • CircularBuffer was retaining cleared items in its backing array rather than releasing them.
  • Shell command execution held ChildProcess and AbortController references after commands completed.
  • Internal caches are now cleared after compaction runs, rather than accumulating across the session lifecycle.
  • File history snapshots are now capped, preventing unbounded memory growth from snapshot accumulation over many edits.
  • Large tool results are cleared from memory after processing rather than being retained for potential re-inspection.

The cumulative effect is significant: long-running sessions that previously required periodic restarts due to memory pressure should exhibit substantially more stable memory profiles.

Other Fixes

  • /mcp reconnect CLI freeze: Passing a non-existent server name no longer hangs the CLI.
  • MCP tool discovery with launch-argument prompts: MCP tools were not discovered when tool search was enabled and a prompt was provided as a launch argument. Fixed.
  • Prompt suggestion cache: An additional regression fix continues work started in v2.1.49 to restore expected cache hit rates.
  • LSP server startupTimeout: Configuration support for startupTimeout on LSP servers is now available.

Version Details

  • Version: 2.1.50
  • Published: February 20, 2026 (UTC) / February 21, 2026 (JST)
  • npm: @anthropic-ai/claude-code
  • Install / upgrade: npm install -g @anthropic-ai/claude-code

Release Cadence Note

v2.1.50 continues Anthropic’s recent pattern of daily patch releases. The concentration of memory fixes suggests internal tooling or testing revealed a broad class of object lifecycle issues across agent, LSP, and shell subsystems simultaneously. For teams running production agentic workflows, upgrading is recommended.

関連記事

news

Claude Code v2.1.47 リリース - Windows対応強化・メモリ改善・40件超のバグ修正

Anthropicは2026年2月19日、Claude Code v2.1.47をリリースした。Windows環境の描画バグ修正、長時間セッションのメモリ改善、起動速度の向上(約500ms短縮)、コンテキスト圧縮後のプランモード保持など40件以上の修正が含まれる。

続きを読む →
news

Claude Code v2.1.49 リリース - バックグラウンドエージェント制御改善・起動高速化・Sonnet 4.6の1Mコンテキスト対応

Anthropicは2026年2月20日、Claude Code v2.1.49をリリースした。バックグラウンドエージェント実行中のCtrl+C/ESC無視バグの修正、起動パフォーマンスの大幅改善、シンプルモードへのファイル編集ツール追加、Yoga WASMメモリリークの修正などが含まれる。また、MaxプランにおいてSonnet 4.6が1Mコンテキストに対応した。

続きを読む →
news

Claude Code v2.1.50 リリース - Worktreeフック追加・大規模メモリリーク修正・Opus 4.6が1Mコンテキスト対応

Anthropicは2026年2月21日(JST)、Claude Code v2.1.50をリリースした。WorktreeCreate/WorktreeRemoveフックの追加、エージェント定義でのworktreeアイソレーション宣言対応、SSHセッション切断時のデータ損失修正、glibc 2.30以前のLinuxでのネイティブモジュール読み込み不具合修正、長時間セッションを対象とした複数のメモリリーク修正、Opus 4.6(高速モード)への1Mコンテキスト対応拡大などが含まれる。

続きを読む →

人気記事

Comparison

ChatGPT(OpenAI)とClaude(Anthropic)の機能比較 2026年版。コーディング・長文解析・コスト・API料金の違いを検証

ChatGPT(GPT-4o/o3)とClaude(Sonnet 4.6/Opus 4.5)を2026年時点の最新情報で比較する。コーディング能力、長文処理、日本語品質、API料金、無料プランの違いをSWE-benchなどのベンチマーク結果とともに解説する。

続きを読む →
opinion

【2026年2月20日 所感】「AIがコードを書く」は仮説から現実になった——しかし私たちはその意味をまだ消化できていない

2026年2月20日に観測したコーディングエージェント関連ニュースの総括と所感。Anthropicの自律性研究、cmux、MJ Rathbunのエージェント事故、HN「外骨格 vs チーム」論争、Stripe Minions週1000件PR、Taalas 17k tokens/sec——朝から夜までの流れを通じて見えてきた「AIがコードを書く時代」の実相を考察する。

続きを読む →
tool

868のスキルをnpx 1コマンドで——「Antigravity Awesome Skills」が主要AIコーディングエージェントの共通スキル基盤になりつつある

Claude Code・Gemini CLI・Codex CLI・Cursor・GitHub Copilotなど主要AIコーディングアシスタントを横断する868以上のスキルライブラリ「Antigravity Awesome Skills」(v5.4.0)を詳細分析。Anthropic・Vercel・OpenAI・Supabase・Microsoftの公式スキルを統合した設計思想、ロール別バンドル・ワークフロー機能、SKILL.mdによる相互運用性のアーキテクチャを解説する。

続きを読む →

最新記事

0 tools selected