⌨️CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR
Also known as CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR=1
It goes back to the start folder after each Bash command.
Think of it like
It is like you go back to your desk after each errand.
Example
Claude ran cd into a subfolder, and Emma's next test run failed there. She sets this, and each command starts at the top.
Why it matters
A command in the wrong folder can build, test or delete the wrong files.
Definition
Example code
bash
export CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR=1
claudeCommon mistake
Key takeaways
- 1Back after each command. To the start.
- 2cd does not carry. To the next.
- 3Main session. Bash and PowerShell.