Skip to content
BENIBIX Learn

sandbox.filesystem.allowRead

AI⌨️ Claude CodeConfiguration

Also known as allowRead

A list of paths that may be read inside a blocked area.

Think of it like

It is like a locked hall with one door left open. The rest stays shut, that one room is free.

Example

Lucy wants commands to read her project and nothing else in her home folder. She blocks ~/ and opens . with allowRead.

Why it matters

It turns wide reads into narrow ones, and you do not have to list each secret.

Definition

sandbox.filesystem.allowRead is a settings key. It lets commands read some paths again, in a place that denyRead blocks. With both keys, commands can read just your project. A deny on one exact path still wins inside a wide allow. So does a deny with a wildcard.

Example code

json
{
  "sandbox": {
    "filesystem": {
      "denyRead": ["~/"],
      "allowRead": ["."]
    }
  }
}
Block the home folder, but let the project be read.

Common mistake

Opening a folder and thinking a blocked file in it opens too. A more exact deny still wins.

Key takeaways

  1. 1
    Re-opens reading. Inside a deny.
  2. 2
    Project-only reads. With denyRead.
  3. 3
    Specific deny wins. Even inside.