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 -pto allow only text styling control sequences while blocking arbitrary control characters. Fixed unescaped output parameters in/insightsHTML 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
opusplanorhaikusettings. 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 savedsonnet[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-reviewand inline git commands from running inside bare repository worktrees,--separate-git-dircheckouts, and Androidrepocheckouts. Added notifications when sandboxed operations likegit checkout,git stash, or autostash pulls cannot modify protected paths such as.claudeconfiguration folders. - CLI Execution and Interface Improvements: Added actionable recovery guidance below organization policy block errors, directing users to run
/rewindor/clear. Fixed non-interactive terminal hangs when runningclaude purgewithout stdin key access, and forcedclaude plugin eval --output-dir ''to fail with an explicit error rather than writing into the active directory. Fixed overcounting on active days in/statsreports.
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
/rewindto adjust the previous prompt or/clearto start a new session context. - Verify subagent configurations using
opusplanorhaikusettings to confirm subagents maintain their dedicated model assignments. - Test inline git commands and
/security-reviewif working within bare repository worktrees, custom--separate-git-dirsetups, or Androidrepoenvironments.
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!