# Claude Code 2.1.314 — a block on writes outside the project and gateway groups

> Claude Code 2.1.314 can refuse every write outside your project and routes gateway users by identity group.

- Org: Anthropic
- Date: 2026-10-30
- Category: tool
- Source: https://github.com/anthropics/claude-code/releases/tag/v2.1.314
- Canonical page: https://ai-tldr.dev/releases/anthropic-claude-code-2-1-314/

Claude Code 2.1.314 adds a permission setting that blocks file writes outside the working directories, lets the Claude apps gateway route upstreams by IdP group, and fixes effort-cap errors and silent exits in claude -p.

## What it is

The permissions.blockWritesOutsideWorkingDirectories setting in Claude Code 2.1.314 makes Write, Edit and NotebookEdit refuse paths outside the working directories in every permission mode. The Claude apps gateway also gains a groups option on upstreams, so only developers in the listed IdP groups reach that upstream, including on failover.

## How it works

Bedrock upstreams can log a guardrail_trace that shows which guardrail filter fired, without the matched text. Each PreCompact hook's output is now capped at 10,000 characters, and conversations over 200K tokens that sit idle are summarized in VS Code and Claude Desktop's Code tab.

## Why it matters

Teams get a hard guard against stray file edits and cleaner gateway access control. Fixes include sessions failing with "Invalid effort level" when an admin caps effort, and claude -p exiting 0 with no output on startup failure; it now prints the error and exits 1.

## Who it's for

teams running Claude Code behind a company gateway or on cloud providers

## Try it

npm i -g @anthropic-ai/claude-code@2.1.314

## Links

- [Release Notes](https://github.com/anthropics/claude-code/releases/tag/v2.1.314)
- [Repository](https://github.com/anthropics/claude-code)
