claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

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

Open yutaokamoto0428 opened this issue 1 year ago • 6 comments

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

yutaokamoto0428 avatar Oct 21 '25 10:10 yutaokamoto0428

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

jinbe0 avatar Oct 21 '25 19:10 jinbe0

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 avatar Oct 21 '25 23:10 ollie-anthropic

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

robertklent avatar Oct 22 '25 15:10 robertklent

critical

6r0m avatar Oct 23 '25 09:10 6r0m

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

ianfiske avatar Oct 27 '25 23:10 ianfiske

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.

github-actions[bot] avatar Nov 04 '25 14:11 github-actions[bot]