claude-code - 💡(How to fix) Fix [BUG] Claude code freezes when running in sandbox (WSL) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#54215Fetched 2026-04-29 06:33:13
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1cross-referenced ×1

Error Message

Error Messages/Logs

Code Example

❯ use curl (not your WebFetch) to fetch google.com as a test

Bash(curl -s -o /dev/null -w "%{http_code}" https://google.com)
  ⎿  Running…

Spelunking… (4s · ↓ 138 tokens · thinking)
  ⎿  Tip: Double-tap esc to rewind the code and/or conversation to a previous point in time

---

Claude Code: 2.1.121
Windows version: 10.0.26200.8246
WSL version: 2.6.3.0
Kernel version: 6.6.87.2-1
bubblewrap 0.6.1
socat version 1.7.4.1

---
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Claude code freezes when running commands with sandbox enabled (same on both sandbox modes) on wsl, e.g. when testing domain permissions:

❯ use curl (not your WebFetch) to fetch google.com as a test

● Bash(curl -s -o /dev/null -w "%{http_code}" https://google.com)
  ⎿  Running…

✶ Spelunking… (4s · ↓ 138 tokens · thinking)
  ⎿  Tip: Double-tap esc to rewind the code and/or conversation to a previous point in time

Nothing happens after that, terminal is unresponsive. Same issue whether a given domain is whitelisted or not. Changing "allowManagedDomainsOnly": true/false also makes not difference.

Claude Code: 2.1.121
Windows version: 10.0.26200.8246
WSL version: 2.6.3.0
Kernel version: 6.6.87.2-1
bubblewrap 0.6.1
socat version 1.7.4.1

What Should Happen?

Claude should proceed with processing the prompt and running the command.

Error Messages/Logs

Steps to Reproduce

  1. Enable sandbox on WSL.
  2. Configure allowed and denied domains in sanbox.network.
  3. Ask claude to use curl on any domain

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.121

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

No response

extent analysis

TL;DR

The issue can be potentially resolved by investigating the sandbox configuration and its interaction with the curl command in WSL.

Guidance

  • Verify that the curl command works as expected outside of Claude Code in the WSL environment to isolate the issue.
  • Check the sandbox configuration files, specifically sandbox.network, to ensure that the domain being accessed (e.g., google.com) is correctly whitelisted or allowed.
  • Test the command with a different domain or without the sandbox enabled to see if the issue persists, helping to narrow down the cause.
  • Consider checking for any updates or known issues with the bubblewrap and socat versions being used, as they are part of the sandbox environment.

Notes

The issue seems to be specific to the WSL environment and the sandbox mode in Claude Code. Without more detailed logs or error messages, it's challenging to provide a precise fix. The steps provided are aimed at troubleshooting and potentially identifying the root cause of the issue.

Recommendation

Apply workaround: Given the information, a potential workaround could involve adjusting the sandbox configuration or testing the command outside of the sandbox environment to see if the issue is sandbox-specific. This approach allows for further troubleshooting without waiting for a potential fix.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING