Read blocking outside working directories: restricted mode, exempt paths, searches and Chrome uploads
Restricted mode now blocks reads outside the working directories, searches and Chrome uploads are fenced too, and blockReadsExemptPaths lets chosen paths through
What probably matters to youSection of the release
What
Claude Code can stop its file tools from reading anything outside your working directories, which are the folders a session is allowed to work in. The setting for this is blockReadsOutsideWorkingDirectories. This release extends that read block:
Restricted mode, which you start with --restricted, now turns on the read block by itself, even when blockReadsOutsideWorkingDirectories is not set to true.
A file refused because of restricted mode gets its own error message: read not allowed under --restricted.
Claude in Chrome file uploads in bypassPermissions mode (the mode that skips permission prompts) no longer skip the permission check when the session is restricted. In restricted mode, an upload is also refused when only an allow rule permits that file.
blockReadsExemptPaths is honoured only from --settings or from settings the program that launched Claude Code passes in. It is ignored in user, project, local and managed settings.
Each exempt entry must be an absolute local path. It cannot be a filesystem root, contain a .. segment, or have spaces around it. Invalid entries are dropped with a warning, and in some conditions Claude Code treats the whole list as empty.
The exempt list is passed to both the read and the write path checks. A new check that runs before the write block can return its own message first.
Searches are now fenced as well. When the read block is on, the folder a search starts from (its search root) is checked against the same boundary, through searchRootFence.
Auto memory files, the notes Claude Code keeps for itself, stay readable under that fence, including a search that starts at the memory folder itself.
A restricted session can no longer read files outside its working directories through a missing setting, a browser upload or a search, and a program that embeds Claude Code can still open specific folders through --settings. If you used restricted mode and relied on reads outside the working directories, expect those reads to be refused now.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Added sinceA small documentation edit on Orchestrate teams of Claude Code sessions touched a line naming bypassPermissions after this was published.You can't set per-teammate permission modes at spawn time. A new teammate starts with the lead's mode, including `bypassPermissions` mode, which `--dangerously-skip-permissions` turns on. If the lead is in [`dontAsk` mode](https://code.cla…agent-teamssee the edit
Confirmed sinceAnthropic's documentation has since written up bypassPermissions, on Configure permissions.To make Claude's file tools refuse paths outside the working directories in every permission mode, including `bypassPermissions`, set one or both of these keys to `true`:permissionssee the edit
How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agreesAnthropic's documentation has since written up bypassPermissions, on Configure permissions.