Feature request: persistent working directory (cd) across Bash calls

Resolved 💬 3 comments Opened Apr 9, 2026 by rodion-m Closed Apr 12, 2026

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": true that lets cd stick
  • Or at minimum, a /cwd command 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:

  1. Work in project A (backend)
  2. Jump to project B (agent service) to check something
  3. Jump to parent dir to run cross-project scripts
  4. 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)

View original on GitHub ↗

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