Claude Code can block writes outside your project folder
A new permissions.blockWritesOutsideWorkingDirectories setting in Claude Code 2.1.314 makes Write, Edit and NotebookEdit refuse paths outside the project, even in bypass permissions mode.
Anthropic shipped Claude Code 2.1.314 on 30 October, adding a new permissions.blockWritesOutsideWorkingDirectories setting. Switch it on and the Write, Edit and NotebookEdit tools refuse any path outside your project’s working directories, in every permission mode, including bypass permissions mode.
Until now, a permission mode that skips confirmation prompts also skipped this particular check: nothing stopped a write tool from touching a path outside the project if the model, or a prompt injected through a file it had read, pointed it there. The new setting sits alongside the existing allow and deny rules in settings.json:
{
"permissions": {
"blockWritesOutsideWorkingDirectories": true
}
}
The same release adds guardrail_trace for Bedrock upstreams on the Claude apps gateway, and 81 other fixes, including sessions that previously failed with an “Invalid effort level” error.
Why it matters: anyone running Claude Code in bypass permissions mode for agentic or CI work has been trusting the model never to misread a path. This setting turns that trust into an enforced boundary, which matters most for anyone pointing an autonomous session at a monorepo or a shared machine.