[BUG] WSL: Unnecessary "Shell cwd was reset" message after every bash command clutters output and LLM context

Resolved 💬 3 comments Opened Aug 9, 2025 by Solenism Closed Aug 9, 2025

## Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.72
  • Operating System: WSL1 (Linux 4.4.0-26100-Microsoft) on Windows
  • Terminal: WezTerm/Powershell/Any (Does not affect the bug)

## Bug Description
Every Bash command execution displays an unnecessary "Shell cwd was reset to..." message, cluttering the output and LLM context with irrelevant information. Additionally, the path shown has incorrect case.

## Steps to Reproduce

  1. Use Claude Code in WSL1 with a Windows-mounted directory (e.g.,

/home/cc/windows-mounts/ErrorCompactor/Main)

  1. Run any bash command (e.g., ls, pwd, echo "test")
  2. Observe that after EVERY command, a reset message appears

## Expected Behavior

  • No message (or only when it makes sense, i.e. trying to cd out of the project directory)

## Actual Behavior

  • Every single bash command triggers: Shell cwd was reset to /home/cc/windows-mounts/ErrorCompactor/main
  • This happens even for commands that don't change directory (like ls, echo, etc.)
  • The path shown has wrong case (shows /main instead of /Main)
  • These messages clutter the output and consume LLM context unnecessarily

## Additional Context

  • WSL1 mounts Windows NTFS filesystems (case-insensitive but case-preserving)
  • The frequent messages are distracting, and like likely degrade Claude Code's performance by filling context with

repetitive, unnecessary messages

  • The directory case is preserved correctly for "ErrorCompactor" but not for "Main"
  • Commands execute correctly despite the messages
  • Most of this report is written by Claude Code itself, obviously
  • The problem is somewhat new, it has started happening a few days ago

View original on GitHub ↗

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