claude-code - 💡(How to fix) Fix Docs: Sandboxing page implies Write/Edit tools are subject to sandbox restrictions [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46799Fetched 2026-04-12 13:32:45
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
labeled ×2

The sandboxing documentation has two sections with wording that implies the built-in Write and Edit tools are subject to sandbox restrictions.

Error Message

With sandbox enabled and allowOnly restricting writes to the working directory:

Root Cause

The sandboxing documentation has two sections with wording that implies the built-in Write and Edit tools are subject to sandbox restrictions.

RAW_BUFFERClick to expand / collapse

Summary

The sandboxing documentation has two sections with wording that implies the built-in Write and Edit tools are subject to sandbox restrictions.

1. "Filesystem isolation" section

The sandboxed bash tool restricts file system access to specific directories:

  • Default writes behavior: Read and write access to the current working directory and its subdirectories
  • Default read behavior: Read access to the entire computer, except certain denied directories

Despite saying "sandboxed bash tool", the bullet points read as general file access rules for Claude Code. A reader would reasonably conclude that Write/Edit are also restricted to the working directory — they are not. Write/Edit can write anywhere the user approves via the permission prompt.

2. "not just Claude's file tools"

These restrictions are enforced at the OS level (Seatbelt on macOS, bubblewrap on Linux), so they apply to all subprocess commands, including tools like kubectl, terraform, and npm, not just Claude's file tools.

The phrase "not just Claude's file tools" suggests the sandbox applies to Write/Edit AND subprocess commands. In practice, Write and Edit bypass the sandbox entirely.

Observed behavior

With sandbox enabled and allowOnly restricting writes to the working directory:

  • Bash: echo "test" > ~/other-dir/file.txt → blocked with "Operation not permitted" (expected)
  • Write tool: writing to ~/other-dir/file.txt → permission prompt shown, succeeds if approved

This confirms the sandbox only applies to Bash subprocesses, not the built-in file tools.

Suggested fix

Make it explicit that these restrictions apply only to Bash subprocesses:

Section 1 — clarify scope:

The sandbox restricts Bash subprocess file system access to specific directories. The built-in Write and Edit tools are not affected by these restrictions — they use the permissions system instead.

Section 2 — fix the misleading phrase:

These restrictions are enforced at the OS level (Seatbelt on macOS, bubblewrap on Linux), so they apply to all Bash subprocess commands, including tools like kubectl, terraform, and npm. Note: the built-in Write and Edit tools are not subprocesses — they use the permissions system instead.

extent analysis

TL;DR

Update the sandboxing documentation to explicitly state that the restrictions apply only to Bash subprocesses, not the built-in Write and Edit tools.

Guidance

  • Clarify the scope of the sandbox restrictions in the "Filesystem isolation" section to indicate they only apply to Bash subprocesses.
  • Update the "not just Claude's file tools" phrase to remove the implication that the sandbox applies to Write and Edit tools.
  • Verify the changes by reviewing the documentation to ensure it accurately reflects the behavior of the sandbox and built-in tools.
  • Test the documentation updates with users to ensure the new wording is clear and concise.

Example

The updated documentation for Section 1 could read:

The sandbox restricts Bash subprocess file system access to specific directories. The built-in Write and Edit tools are not affected by these restrictions — they use the permissions system instead.

Notes

The suggested fix only addresses the documentation issue and does not require any changes to the underlying code or functionality of the sandbox or built-in tools.

Recommendation

Apply the suggested documentation updates to ensure accurate and clear communication of the sandbox restrictions to users.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING