[BUG] Is `/sandbox` command supported on WSL2? Getting "Unknown slash command: sandbox" error
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?
The /sandbox slash command returns Unknown slash command: sandbox error when attempting to use it in Claude Code on WSL2.
According to the documentation (https://github.com/anthropic-experimental/sandbox-runtime?tab=readme-ov-file#platform-support), /sandbox should be available on macOS and Linux (with bubblewrap installed). However, it's unclear whether WSL2 (Windows Subsystem for Linux) is considered a supported Linux environment for this feature.
What Should Happen?
Need clarification on whether WSL2 is supported for the /sandbox command, or if there are additional configuration steps required for WSL2 environments.
Error Messages/Logs
Unknown slash command: sandbox
Steps to Reproduce
- Install Claude Code 2.0.24 on Linux (WSL2)
- Attempt to run
/sandboxcommand in Claude Code - Observe error:
Unknown slash command: sandbox
Additional verification performed:
- Installed required dependencies:
sudo apt install bubblewrap socat ripgrep - Restarted Claude Code
- Attempted to run
/sandboxcommand again - Same error persists
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.24
Platform
Google Vertex AI
Operating System
Windows
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
_No response_
6 Comments
Same problem on Ubuntu 24.04.2 LTS on Windows WSL. Any workaround?
Thanks for reporting. Unfortunately, it's not currently available on Mac OSX and Linux, but we'll make this clearer in the product (change in for the next release)
@ollie-anthropic I have tested and
/sandboxit is available on Mac OS with Claude Code v2.0.25 but not available on WSL2 Ubuntu 24.04 LTS?critical@ollie-anthropic did you mean to say that it's only available on Linux and MacOS?
WSL2 _is_ Linux. That's why the users here are expecting this to work. Please reopen.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.