[BUG] Sandbox Config tab filesystem restrictions dropping leading slash on WSL2
Resolved 💬 4 comments Opened May 9, 2026 by rwestbrock Closed Jun 10, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
My ~/.claude/settings.json file in WSL2 includes the following:
"permissions": {
"deny": [
"Read(/mnt/c/**)",
"Write(/mnt/c/**)",
"Edit(/mnt/c/**)",
"Read(~/**)",
"Write(~/**)",
"Edit(~/**)",
"Read(/home/username/**)",
"Write(/home/username/**)",
"Edit(/home/username/**)",
],
"sandbox": {
"enabled": true,
"allowUnsandboxedCommands": false,
"filesystem": {
"denyRead": ["~/"],
"denyEdit": ["~/"],
"denyWrite": ["~/"],
}
}
When I use the /sandbox command in Claude Code the Config tab shows the read denies for /mnt/c are inside my ~/.claude directory as shown below:
Filesystem Read Restrictions:
Denied: /home/username/.claude/mnt/c, ~, /home/username/.claude/home/username,
Filesystem Write Restrictions:
Allowed: /dev/stdout, /dev/stderr, /dev/null, /dev/tty, /dev/dtracehelper, /dev/autofs_nowait, /tmp/claude,
/private/tmp/claude, /home/username/.npm/_logs, /home/username/.claude/debug, ., /tmp/claude-1000/,
/git-repos/ctmbatch, /git-repos/opsutils
Denied within allowed: /home/username/.claude/settings.json, /etc/claude-code/managed-settings.json,
/etc/claude-code/managed-settings.d, /mnt/c/Program Files/ClaudeCode/managed-settings.json, /mnt/c/Program
Files/ClaudeCode/managed-settings.d, /home/username/.claude/mnt/c, ~,
/home/username/.claude/home/username
I do not have an mnt/c sub-directory in ~/.claude and when I asked Claude Code about why that is happening it told me that the sandboxing on WSL2 must be dropping the leading slash and that I should raise a bug here.
What Should Happen?
Output on the /sandbox Config tab should use absolute paths:
Filesystem Write Restrictions:
Allowed: /dev/stdout, /dev/stderr, /dev/null, /dev/tty, /dev/dtracehelper, /dev/autofs_nowait, /tmp/claude,
/private/tmp/claude, /home/username/.npm/_logs, /home/username/.claude/debug, ., /tmp/claude-1000/
Denied within allowed: /home/username/.claude/settings.json, /etc/claude-code/managed-settings.json,
/etc/claude-code/managed-settings.d, /mnt/c/Program Files/ClaudeCode/managed-settings.json, /mnt/c/Program
Files/ClaudeCode/managed-settings.d, /mnt/c, ~, /home/username
Error Messages/Logs
Steps to Reproduce
- Launch claude
/sandbox- Go to Config tab
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.136
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Windows Terminal
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗