Bible Network Crypto DeFi Onchain RWA AI Agent Stablecoin Chain SAFU CryptoTax DeFAI AGI Claude Me Claude Skill Claude Design Claude Cowork
Independent Media
Not affiliated with any project
Exploring the Frontier of AI Intelligence
claude-me.com
LATEST
Claude Code's ultrathink Now Really Raises the Turn to xhigh: If You Add the Word Out of Habit, Your Cost Quietly Changed  ·  Opus 4.8 Fast Mode Is Removed on November 30 and Then Errors Instead of Falling Back: Scripts With a Hard-Coded Model ID Need a Check Now  ·  Claude Code Adds blockWritesOutsideWorkingDirectories: It Holds Even Under bypassPermissions, but Bash Redirects Are Out of Scope  ·  Claude Max 5x and 20x Become Max and Ultra: Ultra Drops the 5-Hour Limit for Verified Accounts, and How to Check Your Status and Decide Whether to Upgrade  ·  Claude Code Extension 2.1.312 and 2.1.313 on Cursor's Marketplace Carried an SSH Backdoor: A 12-Hour Window, Up to 5,000 Users  ·  Does Claude Code's agent_summary Really Burn 15–20% of Your Tokens? What Is Claimed, What Is Verified, and How to Measure Your Own
practice

Claude Code Adds blockWritesOutsideWorkingDirectories: It Holds Even Under bypassPermissions, but Bash Redirects Are Out of Scope

30-Second Version · For the impatient
This setting blocks writes outside working directories even under bypassPermissions, but Bash redirects, MCP and hooks are out of its scope.

Full Explanation +
01 · Why did this happen?

Once it is on, can Bash still write outside the project?

Yes. Per the article, the setting governs only Write, Edit and NotebookEdit, and shell redirects, MCP tools and hook programs are out of scope.

Blocking those takes a Sandbox in addition.

02 · What is the mechanism?

Can a project's settings turn it on for itself, and also turn it off for me?

It can turn it on but not off. Per the article, project settings can enable it for themselves but cannot lift a Block the user has set; a true in any loaded file applies.

To fully turn it off, delete the key from every file that sets it and restart.

03 · How does it affect me?

I use worktrees. Will I be affected?

Yes. The article says EnterWorktree and ExitWorktree are removed or refused while it is on, and Subagent worktrees outside the working directories are refused writes too.

If your workflow depends on isolation: worktree, confirm in a test project before rolling it out.

04 · What should I do?

How are symlinks handled?

The article does not say how symlinks are handled, nor how paths are normalized. I found no official documentation that fills this in.

Before relying on the setting to protect an important directory, I would test it with a link you create that points outside the project.

Full Content +

Claude Code v2.1.314 (October 30, 2026) added permissions.blockWritesOutsideWorkingDirectories: when on, Write, Edit and NotebookEdit refuse paths outside the working directories, identically in every permission mode. The changelog gives one line; the details come mainly from a third-party write-up by Developers Digest, and I did not read the official documentation directly, so I mark below what the article leaves unclear.

How to Set It

The setting lives in the permissions object of ~/.claude/settings.json. It is a boolean, unset by default, with false equivalent to unset, and needs v2.1.314 or later. The article says any loaded settings file can set it; a true in any one file applies, even if a managed source sets false. A project's own settings can turn it on for itself but cannot lift a Block the user has set. The article says it refuses in every mode, including bypassPermissions.

What It Blocks and What It Does Not

It governs only the three file tools: Write, Edit and NotebookEdit. Out of scope are shell commands (a redirect such as echo x > ~/file), MCP tools, and programs run by hooks, which the article says need a Sandbox. A few things can still be written outside the project: plan files, the session scratchpad, a background session's tmp directory, and .md files in the project's auto memory.

What Is Refused Even Inside Working Directories

The article lists several writes refused even within working directories: Claude Code's own settings files (so a settings file cannot lift the block), directories added only through a project's additionalDirectories, .claude/settings.local.json unless git reports it as untracked, Subagent worktrees outside the working directories (isolation: worktree), and an autoMemoryDirectory set through project settings. A side effect is that EnterWorktree and ExitWorktree are removed or refused while it is on.

How Working Directories Are Counted

The article gives no full definition, only the ways to add one: /add-dir during a session (the directory must exist), --add-dir at startup, or additionalDirectories in user or managed settings. Allow rules do not let file tools past the block, and a directory listed only in the project's .claude/settings.json does not count. If Claude Code cannot read the permissions object in managed settings, the block stays on. Cloud sessions might not apply the key. How symlinks are handled and how paths are normalized, the article does not say.

How to Test and Remove It

To test, ask Claude to use the Write tool to create ~/block-test.txt (assuming home is not a working directory); the refusal names the permissions.blockWritesOutsideWorkingDirectories setting. To remove it, delete the key from every file that sets it and restart; a false in one file does nothing while another file still says true.

What This Means for Your Money

Before letting an agent run unattended, this setting is a cheap first layer of insurance: one wrong path overwriting a file in your home directory costs far more to repair than five minutes spent flipping a boolean. But do not conclude that writes are now controlled: Bash redirects, MCP tools and hook programs are out of scope, and the real boundary still needs a sandbox. Turn it on in a test project first, verify the refusal with the method above, then push it to your team's managed settings; also check whether you rely on worktrees or project-level additionalDirectories, since those will be blocked along with it.

Sources: Developers Digest: Claude Code blockWritesOutsideWorkingDirectories — Keep Edits Inside the Project, Classmethod: Claude Code v2.1.314 Major Updates
Diagram
Which Write Paths blockWritesOutsideWorkingDirectories CoversblockWritesOutsideWorkingDirectories 擋住與沒擋住的寫入路徑對照Which Write Paths blockWritesOutsideWorkingDirectories CoversCovered: refused outside working dirsWrite toolEdit toolNotebookEdit toolHolds in every mode, incl. bypassPermissionsAlso refused inside: settings files,project-only additionalDirectoriesNot covered: needs a sandboxShell redirects (echo x > file)MCP toolsPrograms run by hooksStill writable outside: plan files, scratchpad,background tmp, auto-memory .md filesSymlink handling: not statedNeeds v2.1.314+. Any file with true turns it on. Remove it from every file to turn it off.Claude Me · claude-me.com
Feel free to share. Please credit the source.
Ask a Question
Please enter at least 10 characters
Related Articles
Claude Code's ultrathink Now Really Raises the Turn to xhigh: If You Add the Word Out of Habit, Your Cost Quietly Changed
practice · Nov 05
Opus 4.8 Fast Mode Is Removed on November 30 and Then Errors Instead of Falling Back: Scripts With a Hard-Coded Model ID Need a Check Now
practice · Nov 05
Claude Max 5x and 20x Become Max and Ultra: Ultra Drops the 5-Hour Limit for Verified Accounts, and How to Check Your Status and Decide Whether to Upgrade
practice · Nov 03
Does Claude Code's agent_summary Really Burn 15–20% of Your Tokens? What Is Claimed, What Is Verified, and How to Measure Your Own
practice · Nov 03
More Related Topics