[BUG] Claude Code CLI Harness Shell Snapshot overriding attempted fixes in bashrc to solve the inability for Claude to run shall commands in WSL2

Resolved 💬 5 comments Opened May 21, 2026 by PrimeDominus Closed Jun 21, 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?

Running Claude Code CLI v2.1.146 in WSL2 (Debian 12) on latest stable Windows 11. Recently Claude started getting errors while attempting to run basic linux (bash) commands. It forces me to run such commands manually, then copy paste the output. It's tedious and annoying.

I've searched online and tried a few fixes that seem to make sense. The problem seems to be Windows path entries with parenthesis in $PATH, yet even with my attempts and fixing this in my ~/.bashrc Claude believes the problem is due to the harness shell snapshot not applying my new shell fixes. When I ask claude to check if it's fixed, it replies "Still getting PATH errors with Windows paths containing parentheses (like "Program Files (x86)"). This is a Claude Code harness shell snapshot issue I can't work around."

What Should Happen?

It should be able to run basic commands in WSL

Error Messages/Logs

Bash(pnpm install)
  ⎿  Error: Exit code 2
     /bin/bash: -c: line 1: syntax error near unexpected token `('
     /bin/bash: -c: line 1: `source /home/...<list of entries in $PATH>

Steps to Reproduce

This only began happening in the last few days, and I haven't used it differently. Only changes has been installing plugins from Telnyx and Sinch.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

v2.1.146

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

_No response_

View original on GitHub ↗

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