[BUG] Is `/sandbox` command supported on WSL2? Getting "Unknown slash command: sandbox" error

Status Fixed / completed
Maintainer reply ✓ Yes — ollie-anthropic
Activity 6 comments · opened Oct 21, 2025 · closed Oct 21, 2025
💡 Likely answer: A maintainer (ollie-anthropic, collaborator) responded on this thread — see the highlighted reply below.

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

  1. Install Claude Code 2.0.24 on Linux (WSL2)
  2. Attempt to run /sandbox command in Claude Code
  3. Observe error: Unknown slash command: sandbox

Additional verification performed:

  • Installed required dependencies: sudo apt install bubblewrap socat ripgrep
  • Restarted Claude Code
  • Attempted to run /sandbox command 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_

View original on GitHub ↗

6 Comments

jinbe0 · 10 months ago

Same problem on Ubuntu 24.04.2 LTS on Windows WSL. Any workaround?

ollie-anthropic collaborator · 10 months ago

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)

robertklent · 10 months ago

@ollie-anthropic I have tested and /sandbox it is available on Mac OS with Claude Code v2.0.25 but not available on WSL2 Ubuntu 24.04 LTS?

6r0m · 10 months ago

critical

ianfiske · 10 months ago

@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.

github-actions[bot] · 9 months ago

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.