Claude Code 2.1.314
By Steven Van ·
Version 2.1.314 adds a setting to block writes outside working directories, gateway group routing, and idle compaction in VS Code and Claude Desktop.
Claude Code 2.1.314 adds a setting that blocks file writes outside the working directories, plus several additions for the Claude apps gateway. The Claude Code changelog entry also lists four fixes.
What's new
- Write restriction: with permissions.blockWritesOutsideWorkingDirectories set, Write, Edit and NotebookEdit refuse paths outside the working directories in every permission mode.
- Gateway upstream groups: Claude apps gateway upstreams accept an optional groups list. Only developers in the listed IdP groups are sent to that upstream, including on failover.
- Bedrock guardrail logging: Claude apps gateway Bedrock upstreams gain guardrail_trace. It logs which Amazon Bedrock guardrail filter fired on a request, without the matched text.
- Idle compaction: in VS Code and the Code tab of Claude Desktop, a conversation of 200K+ tokens that is left idle is summarized. If the prompt cache has expired, the summary is used on the next message.
Fixes
- Sessions no longer fail turn after turn with "Invalid effort level" when an organization's admin caps a model's effort. Claude Code now lowers the effort, retries, and says which level it uses.
- claude -p no longer exits with code 0 and no output when startup fails. It prints the error and exits 1.
- Bedrock sessions with many images no longer fail every turn, and /compact no longer fails with "400 Input is too long." Older images are removed and the conversation is compacted.
- A fix for Microsoft Foundry sessions that fail when the resource has no deployment for the default Sonnet model is also listed.
Claude Code
Anthropic's agentic coding tool — Claude in your terminal, IDE, desktop app and browser, reading and editing your codebase, running commands, opening pull requests and working on tasks in the cloud.
View Claude Code →