Playbooks · Coding tasks
Claude Code 2.1.325 fixes a zstd security issue
Written November 14, 2026
2.1.325 fixes how zstd responses are decoded, stops gateway sessions failing on context length, and keeps background sessions on your own sign-in.
What changed
Claude Code 2.1.325 leads its notes with a security fix, and the rest of the release is mostly fixes: a gateway problem that could break a session on every turn, background sessions drifting onto the wrong sign-in, and two subagent model bugs. The version line also skips a number. The notes go from 2.1.323, covered in the previous release page, straight to 2.1.325, with no 2.1.324 entry in between. If you run Claude Code through a third-party gateway or Foundry, or you leave background sessions running, this is the update to take first.
The zstd security fix
The first item in the notes is short: the release fixes a security issue in how zstd-compressed responses are decoded. Anthropic gives no severity rating, no affected-version range, and no workaround in the notes themselves, so there is nothing more precise to pass on here. A decoding flaw in a component that handles server responses is the kind of fix that argues for updating promptly rather than waiting for a quiet week. The notes list no action beyond taking the new version: no setting to change and no cache to clear.
Gateway and Foundry sessions stop failing on context length
The second fix with daily consequences is for sessions running on many third-party gateways and on Foundry. Those sessions could stop with a context length error on every turn instead of compacting the conversation. A session in that state is unusable: each new prompt fails the same way, and the only way forward was to abandon the conversation. The notes say those sessions now compact as they should. Anyone who routes Claude Code through a gateway should treat this as the other reason to move to 2.1.325 soon, especially if long sessions have been dying mid-task.
Background sessions stay on your sign-in
Two fixes concern which account a background session runs under. A background session started on a claude.ai login could use, and bill, an API key or token taken from the shell that started the background service. That meant work you expected to run under your subscription login could draw on a key from your environment instead. The notes also say that more cases of a session moving to another sign-in in the background are now refused, with a message saying what works. Together the two fixes make the billing and identity of a background session match the sign-in it was started with.
Subagents, model settings, and one clearer error
Subagents get two fixes. A subagent with its own model could be moved to the plan-mode model when the model setting was opusplan or haiku; that no longer happens. A subagent running on a different model from the main session also sized its file reads and MCP results with the main session's model; it now uses its own. Two smaller items round out the model area: a saved sonnet[1m] model setting was being rewritten on a new install to a model ID the API rejects, and that rewrite is fixed. When your organization's policy blocks a request, the error now carries a line saying how to continue: run /rewind and change the message, or run /clear.
One default worth knowing about
Buried in the changes is a sandbox default: sandboxed Bash commands now follow the normal permission flow by default. If you relied on sandboxed commands running without prompts, the notes name the setting that keeps the old behaviour, sandbox.autoAllowBashIfSandboxed: true. Teams that manage settings centrally need the same setting in the highest-ranking managed source. It is a small line in a long list, but it is the one most likely to surprise a team the morning after an unattended update.
What to do
Update to 2.1.325. The zstd fix alone justifies it, and gateway, Foundry, and background-session users get fixes for failures that could otherwise recur every session. Before updating a managed setup, decide whether to set sandbox.autoAllowBashIfSandboxed so sandboxed commands keep running without prompts. No other migration step is named in the notes.
Related playbooks
- Claude Code 2.1.325 widened the email check
- Security-review your own code with Claude Code
- Codex Security 0.10.0: resume a scan, cap a batch
- Coding-agent traces in advisory fixes
Sources
- Claude Code CHANGELOG — GitHub, anthropics/claude-code
- Claude Code v2.1.325 release — GitHub, anthropics/claude-code
Back to: Coding playbooks hub · Also: Claude Code 2.1.323: Code Mode writes the tool calls · Copilot CLI 1.0.112: the November 13 build