Skip to content

additionalDirectories setting does not grant Read tool access to files outside project #29013

Description

@diogomatoschaves

Bug Description

The additionalDirectories setting in .claude/settings.local.json does not grant the Read tool access to files in the specified directories. Files outside the project directory remain blocked with EPERM: operation not permitted even after being added.

Steps to Reproduce

  1. Add a directory outside the project to additionalDirectories (either via /add-dir command or manually in settings):
    {
      "permissions": {
        "additionalDirectories": [
          "/Users/<user>/Documents/Screenshots/"
        ]
      }
    }
  2. Attempt to read a file from that directory using the Read tool
  3. Observe EPERM: operation not permitted error

Observed Behavior

  • Read tool: EPERM: operation not permitted
  • Bash with ls -la: Works (can stat the file, see metadata/permissions/size)
  • Bash with cp: Operation not permitted (even with dangerouslyDisableSandbox: true)

This suggests the sandbox allows stat() but blocks open() for file reads in additionalDirectories paths.

Expected Behavior

After adding a directory via additionalDirectories, the Read tool (and Bash file operations) should be able to access files in that directory.

Environment

  • Claude Code version: 2.1.59
  • OS: macOS (Darwin 25.3.0)
  • macOS Full Disk Access: Granted to terminal app
  • Setting location: .claude/settings.local.json (project-level)

Notes

  • The /add-dir command confirms the directory was added: Added /Users/<user>/Documents/Screenshots/ as a working directory and saved to local settings
  • The directory in question (~/Documents) is macOS TCC-protected, but Full Disk Access is already granted to the terminal application
  • This may be a sandbox profile issue where additionalDirectories paths are not being included in the sandbox allow-list for file reads

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions