[FEATURE] Find a reliable way to making Claude be aware of the current folder it has cd'ed in
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
One permanently reoccurring error pattern that claude runs into is that it runs a sequence of commands which include switching the current folder with the cd command. Then in subsequent commands it has forgotten that it did change the current folder and assumes it is still in the top folder which then makes commands that rely on that (e.g. those that use relative paths) fail - this fail usually triggers a time- and token-wasting inquiry what went wrong until it realizes that it has to cd up again or use absolute paths.
Proposed Solution
I don't know what the "perfect" solution for this is, maybe something simple as injecting "you are currently in /some/path/here", but then again I would expect that this is already being done?
Alternative Solutions
One way would be to make sure that after every cd command it ends the chain of commands with a cd back to the top directory
Priority
Medium - Would be very helpful
Feature Category
CLI commands and flags
Use Case Example
● Bash(cd src/frontend && npm run build)
● Bash(cp -r src/frontend/dist/* src/monitoring/static/)
⎿ Error: cp: cannot stat 'src/frontend/dist/*': No such file or directory
● Let me check what was built:
● Bash(ls -la src/frontend/)
⎿ Error: ls: cannot access 'src/frontend/': No such file or directory
● The build error suggests the frontend build failed. Let me check the project structure to find the correct frontend directory:
Additional Context
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗