[BUG] Network Sandbox in WSL intermittent failures

Resolved 💬 5 comments Opened May 27, 2026 by hoo29 Closed Jul 12, 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?

External network requests from a sandboxed claude session fail around 50% of the time (to the same address), the errors are along the lines of Couldn't connect to server. With sandbox disabled there are no issues.

What Should Happen?

All requests should work.

Error Messages/Logs

There are no debug logs I can find. When it fails it fails immediately, like the proxy has stopped listening.

! curl https://google.com
  ⎿    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                      Dload  Upload   Total   Spent    Left  Speed
       0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0  0     0    0     0    0     0
     … +8 lines (ctrl+o to expand)

! curl https://google.com
  ⎿    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                      Dload  Upload   Total   Spent    Left  Speed
       0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0100   220  100   220    0     0
     … +7 lines (ctrl+o to expand)

! curl https://google.com
  ⎿    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                      Dload  Upload   Total   Spent    Left  Speed
       0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0  0     0    0     0    0     0
     … +2 lines (ctrl+o to expand)

! curl https://google.com
  ⎿    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                      Dload  Upload   Total   Spent    Left  Speed

       0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
       0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
     curl: (7) Failed to connect to localhost port 3128 after 0 ms: Couldn't connect to server

Steps to Reproduce

  1. Use settings

``
"sandbox": {
"enabled": true,
"failIfUnavailable": true,
"autoAllowBashIfSandboxed": true,
"allowUnsandboxedCommands": false,
"network": {
"allowAllUnixSockets": true
}
}
``

  1. Run ! curl https://google.com ten times and see if it works every time.

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.152

Platform

AWS Bedrock

Operating System

Other Linux

Terminal/Shell

Windows Terminal

Additional Information

PS C:\Users\HuwM> wsl --version
WSL version: 2.7.3.0
Kernel version: 6.6.114.1-1
WSLg version: 1.0.73
MSRDC version: 1.2.6676
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26200.8390
 $ cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.4 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo

$ uname -a
Linux redacted 6.6.114.1-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Mon Dec  1 20:46:23 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗