New release

Claude Code 2.1.314 can block edits outside your project

Claude Code 2.1.314 adds an opt-in setting that stops Claude's file tools from editing outside your project folder, in every permission mode.

Date
Works with
Claude Code

What’s new

Claude Code 2.1.314 came out on 30 October 2026. It adds the setting permissions.blockWritesOutsideWorkingDirectories. The changelog says that with it on, "Write, Edit and NotebookEdit refuse paths outside the working directories in every permission mode". Write, Edit and NotebookEdit are the tools Claude uses to change files. The working directories are the folder where you started Claude Code and the folders you added with /add-dir.

It also fixes claude -p "exiting with code 0 and no output when startup failed; it now prints the error and exits 1". Other fixes: TLS connections that failed with UNABLE_TO_GET_ISSUER_CERT when the system holds a renewed, cross-signed root certificate, MCP servers that also work without sign-in now run signed out when their stored sign-in stops working, and sandbox protections now apply to a worktree entered by claude -p --resume or --continue.

Why it matters

Without this setting, whether Claude can change a file outside your project folder depends on the permission mode. With it on, the file tools refuse such a change in every mode. This setting does not cover terminal commands that Claude runs: the changelog names only the three file tools. The Claude Code docs do not describe the setting yet. Scripts that run claude -p can now see when Claude Code failed to start.

How to try it

Run claude update, then claude --version. It should show 2.1.314 or later. The "stable" channel still gives 2.1.309, which does not have this setting. Then add "blockWritesOutsideWorkingDirectories": true inside the "permissions" part of ~/.claude/settings.json. If the file has no "permissions" part yet, add one: "permissions": { "blockWritesOutsideWorkingDirectories": true }. Start a new session after you save the file.

Source

Checked against the source on 31 Oct 2026

All updates