[BUG] Claude Code CLI hangs forever on Bash()/shell commands in WSL (even with correct user/permissions, native Linux path)

Resolved 💬 11 comments Opened Aug 3, 2025 by dlepold Closed Jan 24, 2026

Environment

  • Platform: [x] Other (Anthropic Claude Code CLI)
  • Claude CLI version: 1.0.67 (claude --version)
  • Operating System: Windows 11, WSL2, Debian 12 (latest, fully updated)
  • Terminal: Windows Terminal, Bash (/bin/bash)

Bug Description

When running any Bash() shell command (such as df -h, ls, pwd, etc.) via Claude Code CLI, the tool hangs forever at “Envisioning…” or “Musing…”.
This occurs even when launched from a native Linux folder (e.g. /home/david/testclaude), not just from /mnt/c or Windows-mount paths.
Other CLI tools (e.g. Gemini CLI) and native bash shell commands work perfectly in the same environment and folders. I got Claude Desktop for Windows installed: works perfectly. Also running claude in native Linux, also works perfectly. in WSL everything seems to work except ANY Bash([command]). Various uninstall reinstall via npx and also via native install...sh didnt change this.

Steps to Reproduce

  1. Install Claude Code 1.0.67 via the native installer (curl -fsSL https://claude.ai/install.sh | bash) as a normal user (david), not root.
  2. Ensure user has full sudo rights (david ALL=(ALL:ALL) ALL in /etc/sudoers, also in the sudo group).
  3. Confirm that ~/.local/bin is in the user’s PATH and that claude runs from any location.
  4. Open a terminal, change to a native Linux folder (e.g. /home/david/testclaude).
  5. Start claude CLI, ask it to run a simple shell command (e.g. df -h or ls).
  6. Observe that Claude CLI hangs forever on “Envisioning…” with no output.

Expected Behavior

Claude CLI should run the shell command and return its output promptly (as it does on native Linux).

Actual Behavior

Claude CLI hangs on “Envisioning…” or “Musing…” for all shell commands—indefinitely.

  • The same commands work instantly in Gemini CLI and native shell.
  • The issue persists regardless of permissions, user config, or working directory (even in /home/david).

Additional Details

  • Time sync is verified, no drift between Windows and WSL clocks.
  • User has full sudo rights, and shell commands run fine manually.
  • Tried full uninstall/reinstall of Claude CLI, both as user and as root (with proper cleanup).
  • No custom /etc/sudoers.d rules left.
  • WSL2, Debian, all packages and kernel up to date.

Screenshots

<img width="945" height="941" alt="Image" src="https://github.com/user-attachments/assets/2c5c4a90-3b41-4d87-a87b-65b8dd182da8" />

<img width="1588" height="656" alt="Image" src="https://github.com/user-attachments/assets/21f7354d-f1e7-450a-bd58-b0cbc741f151" />

<img width="1007" height="334" alt="Image" src="https://github.com/user-attachments/assets/69627912-c925-4bc3-9954-2b8442e57e58" />

it works in parallel terminal in UBUNTU (but i need it to run in debian):

<img width="1214" height="932" alt="Image" src="https://github.com/user-attachments/assets/ebc6e707-5607-4180-b0ad-4cafc098aefe" />

See attached for the CLI hang in /home/david/testclaude.

Workarounds Tried

  • Native shell and Gemini CLI both work
  • Changing folder from /mnt/c to /home/david does not help
  • Restarting WSL, Windows, and reinstalling Claude CLI does not help

Request

Please investigate and provide a workaround or fix for Claude CLI shell command execution in WSL environments.

View original on GitHub ↗

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