Anthropic Patches Zstd Decoding Vulnerability and Subagent Model Scoping in Claude Code v2.1.325

464 words
2 minutes
Anthropic Patches Zstd Decoding Vulnerability and Subagent Model Scoping in Claude Code v2.1.325

What changed#

Anthropic released Claude Code v2.1.325, addressing security vulnerabilities, subagent scoping issues, and endpoint stability failures.

  • Security and Terminal Output Fixes: Resolved a security flaw in the decoding process for zstd-compressed responses. Restricted plain-text terminal output from claude -p to allow only text styling control sequences while blocking arbitrary control characters. Fixed unescaped output parameters in /insights HTML reports to prevent formatting or script injection risks.
  • Subagent and Model Context Isolation: Fixed an issue where subagents configured with individual models were incorrectly reset to the plan-mode model when using opusplan or haiku settings. Resolved a bug where subagents using non-default models calculated file read and Model Context Protocol (MCP) result limits using the main session’s model context instead of their own. Fixed a fresh-installation bug that rewrote saved sonnet[1m] configurations to an invalid model ID rejected by the API.
  • Gateway Context Compaction: Fixed repeated context length errors affecting sessions running on Foundry and third-party gateways, ensuring context auto-compaction triggers properly instead of crashing every turn. Fixed missing recent turns in resumed sessions after an unclean application exit.
  • Git and Repository Handlers: Fixed errors preventing /security-review and inline git commands from running inside bare repository worktrees, --separate-git-dir checkouts, and Android repo checkouts. Added notifications when sandboxed operations like git checkout, git stash, or autostash pulls cannot modify protected paths such as .claude configuration folders.
  • CLI Execution and Interface Improvements: Added actionable recovery guidance below organization policy block errors, directing users to run /rewind or /clear. Fixed non-interactive terminal hangs when running claude purge without stdin key access, and forced claude plugin eval --output-dir '' to fail with an explicit error rather than writing into the active directory. Fixed overcounting on active days in /stats reports.

Why it matters#

Building on security refinements introduced in Claude Code v2.1.309 and context management fixes in Claude Code v2.1.311, this release addresses key operational boundaries in multi-agent environments.

By ensuring subagents evaluate file inputs and MCP payloads against their own context limits rather than inheriting the main session’s model size, complex task pipelines avoid premature context exhaustion. Furthermore, restoring auto-compaction for third-party gateways and Foundry endpoints resolves persistent failures in long-running agent workflows.

Filtering raw terminal control sequences in stdout prevents unintentional command execution or screen corruption when developers script around claude -p CLI output.

What to do next#

  • If organizational policies reject a request, run /rewind to adjust the previous prompt or /clear to start a new session context.
  • Verify subagent configurations using opusplan or haiku settings to confirm subagents maintain their dedicated model assignments.
  • Test inline git commands and /security-review if working within bare repository worktrees, custom --separate-git-dir setups, or Android repo environments.

Limitations#

The release notes do not disclose a CVE identifier or provide specifics regarding the exact exploitation vector associated with the zstd response decompression issue or the control sequences filtered from claude -p terminal streams.

Sources#

Share Article

If this article helped you, please share it with others!

Comments

Table of Contents