[BUG] Working directory resets between tool calls

Open 💬 0 comments Opened Jun 29, 2026 by profitableconventions

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?

The Bash and PowerShell tools both reset to the primary working directory between every command, even after using cd or Set-Location. According to the docs, the working directory should persist between commands, but it doesn't.

What Should Happen?

Expected: directory should persist between calls as documented.

Error Messages/Logs

None just when i do pwd i see t has come out of the file

Steps to Reproduce

Steps to reproduce:

Run cd test in Bash
Run pwd in the next Bash call
Result: back in the original directory, not test
Same behavior with PowerShell Set-Location.

This forces prefixing every command with cd <path>; which wastes tokens and is a bad experience.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.195

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗