[FEATURE] Auto-restrict sandbox to current working directory
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Claude Code should automatically restrict filesystem access (read AND write) to the current project directory by default, with an explicit notification that this restriction is active.
Current behavior:
- Sandbox allows read access to entire filesystem
- User must manually create .claude/settings.json in each project
- No automatic notification of sandbox status
Requested behavior:
- On startup, automatically restrict read.allowOnly and write.allowOnly to current working directory + /tmp/claude
- Show clear notification: "Sandbox active - restricted to: [project path]"
- If not active, warn user to enable it
- Make this the DEFAULT behavior for security
Why this matters:
Teams and security-conscious users cannot use Claude Code without this feature. Current behavior is a security risk.
Proposed Solution
.
Alternative Solutions
_No response_
Priority
Critical - Blocking my work
Feature Category
CLI commands and flags
Use Case Example
_No response_
Additional Context
_No response_
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗