Feature request: persistent working directory (cd) across Bash calls
Problem
When working in a monorepo with multiple projects, there's no way to change the working directory persistently during a session. Each Bash tool invocation resets cwd to the project root, making cd .. or cd <subproject> effectively useless.
Current behavior
! cd .. && pwd
# outputs: /parent/dir
# Shell cwd was reset to /project/root
The cd works within a single chained command but doesn't persist to the next Bash call. This is frustrating in monorepo setups where you need to jump between sibling projects frequently.
Desired behavior
A way to change the working directory that persists across Bash calls within a session. For example:
- A
/cd <path>slash command that sets the session's working directory - Or a setting like
"persistCwd": truethat letscdstick - Or at minimum, a
/cwdcommand to view and change the current anchor directory
Use case
Monorepo with 5-10 sibling projects under a shared parent directory. During a single session, I often need to:
- Work in project A (backend)
- Jump to project B (agent service) to check something
- Jump to parent dir to run cross-project scripts
- Come back to project A
Currently, every command needs absolute paths or cd <path> && <command> chaining, which is verbose and error-prone.
Environment
- Claude Code CLI on macOS
- Claude Opus 4.6 (1M context)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗