Skip to main content
AI RADARVibe Coding
0•10/31/2026, 08:17•2 min read

Claude Code 2.1.314: New Security Setting for File Writes

Claude Code 2.1.314: New Security Setting for File Writes
Executive TL;DR30s read

Claude Code 2.1.314 introduces a setting that can prevent Claude from writing files outside working directories, even in bypass permissions mode.

Claude Code 2.1.314 has introduced a new security setting.

It is now possible to prevent Claude from writing files outside working directories even when bypass permissions mode is enabled.

To do this, enable the blockWritesOutsideWorkingDirectories parameter in settings.json:

JSON
{
  "permissions": {
    "blockWritesOutsideWorkingDirectories": true
  }
}

The setting was tested with the Write and Edit tools, and writes were blocked in both cases.

However, there is an important limitation: this setting does not apply to Bash commands.

Bash can still write files outside the project.

For stronger protection, use this setting together with the sandbox in settings.json:

JSON
{
  "permissions": {
    "blockWritesOutsideWorkingDirectories": true
  },
  "sandbox": {
    "enabled": true
  }
}

Why it matters

Analysis

The setting reduces the risk of accidental file changes outside a project when using AI coding tools, but it should be combined with sandboxing for stronger isolation.

Discuss in community

Share your questions and insights with developers

Join Telegram
+5 Points
← Back to news feed

Related in Ecosystem

Practical guides, core terminology, and agent skills