Skip to content

[BUG] Claude Code freezes from time to time for almost 2 minutes on some operations on WSL2 since version 2.1.149 #62038

Description

@jaimelancai

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?

SInce version 2.1.150, I have detected that Claude Code runnign under WLS2 (Ubuntu 24.04 LTS) freezes from time to time for almost 2 minutes in some operations. I returned to previous versions without succes.
When executing prompts on Claude Code on a Windows path but from WSL2 (Linux) execution, it freezes often at least for 2 minutes in some operations. If I move the execution to the native Linux path on WSL2, it is not happening. It start happening after the release of the version 2.1.150 (I detected it on this one).
Claude Code is occasionally getting stuck in 9P RPC calls for ~100s at a time as far as I can see it and it is impossible to know from my side if it comes from a 9P regression or Claude Code regression.
It happens with Sandbox enabled (BashTool + auto-allow), if I disbaled the sandbox, looks like it is not happening more.

What Should Happen?

Claude Code should execute the prompts without freezing as it was doing before.

Error Messages/Logs

I used strace to get more info and here you are 3 examples of the log from strace I got (check the time to see the freeze on them):

Command: sudo strace -p $(pgrep claude) -T -tt -e trace=network,read,write

##### LOG 1 ######
16:35:43.811882 read(7, "\1\0\0\0\0\0\0\0", 8) = 8 <0.000099>
16:35:43.865114 write(11, "\33[?2026h\33[2D\33[3B\r\33[6A\33[38;5;131m"..., 63) = 63 <0.000129>
16:35:43.925466 recvfrom(22, "", 262144, MSG_DONTWAIT, NULL, NULL) = 0 <0.000094>
16:35:43.926736 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=1433, si_uid=1000, si_status=0, si_utime=32 /* 0.32 s */, si_stime=309 /* 3.09 s */} ---
16:35:43.926886 recvfrom(20, "", 262144, MSG_DONTWAIT, NULL, NULL) = 0 <0.000084>
16:35:43.932315 socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, [19, 20]) = 0 <0.000089>
16:35:43.937516 read(20, "1370 (claude) R 1349 1370 1349 3"..., 1023) = 319 <0.000121>
16:35:43.938460 read(20, "1370 (claude) R 1349 1370 1349 3"..., 1023) = 319 <0.000090>
16:37:29.098283 read(20, "1370 (claude) R 1349 1370 1349 3"..., 1023) = 319 <0.000102>
16:37:29.107904 read(20, "1370 (claude) R 1349 1370 1349 3"..., 1023) = 320 <0.000122>

##### LOG 2 ######
16:41:07.057543 read(19, "1370 (claude) R 1349 1370 1349 3"..., 1023) = 321 <0.000105>
16:41:07.058392 read(19, "1370 (claude) R 1349 1370 1349 3"..., 1023) = 321 <0.000102>
16:41:07.059960 read(19, "1370 (claude) R 1349 1370 1349 3"..., 1023) = 321 <0.000102>
16:42:50.825834 socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, [17, 18]) = 0 <0.000123>
16:42:50.826507 socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, [19, 20]) = 0 <0.000106>
16:42:50.827152 socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, [22, 23]) = 0 <0.000110>

##### LOG 3 ######
16:44:47.301113 read(18, "1370 (claude) R 1349 1370 1349 3"..., 1023) = 322 <0.000083>
16:44:47.309588 write(11, "\33[?2026h\33[2D\33[3B\r\33[7A\33[38;5;174m"..., 62) = 62 <0.000126>
16:44:47.310102 read(7, "\1\0\0\0\0\0\0\0", 8) = 8 <0.000084>
16:46:31.492857 socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, [17, 18]) = 0 <0.000120>
16:46:31.493509 socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, [19, 20]) = 0 <0.000106>
16:46:31.494178 socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, [22, 23]) = 0 <0.000102>

Steps to Reproduce

  1. Start a session of claude code (2.1.150) on a WSL2 console but on a Windows Path (/c/mnt/...) with a development project (In my case I am using a Unity Project)
  2. Set Sandbox on (active Sandbox)
  3. Execute any prompt like "Describe to me this project"
  4. See how from time to time the execution is freezing an the CLI is unresponsive (ESC or Ctrl+C are not working).

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.132

Claude Code Version

2.1.150

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:sandboxbugSomething isn't workinghas reproHas detailed reproduction stepsplatform:wslIssue specifically occurs on WSLregressionstaleIssue is inactive

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions