claude-code - 💡(How to fix) Fix Feature request: /cd command to change working directory mid-session [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46368Fetched 2026-04-11 06:22:07
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Author
Timeline (top)
commented ×1labeled ×1
RAW_BUFFERClick to expand / collapse

When working with MATLAB (or other tools that change working directories frequently), there's no way to sync Claude Code's working directory without restarting the session. A built-in /cd command would be very useful. /add-dir doesn't fully solve this since it doesn't change the primary working directory.

extent analysis

TL;DR

Implementing a built-in /cd command in Claude Code would allow users to sync the working directory without restarting the session.

Guidance

  • Consider adding a feature request for the /cd command to change the primary working directory in Claude Code.
  • Evaluate the current functionality of /add-dir to understand its limitations in addressing the working directory issue.
  • Investigate potential workarounds, such as manually updating the working directory through external tools or scripts, until a built-in solution is available.
  • Assess the impact of frequent working directory changes in MATLAB and other tools on the overall workflow with Claude Code.

Notes

The implementation of the /cd command may require significant changes to Claude Code's architecture, and its development should be prioritized based on user needs and feedback.

Recommendation

Apply workaround: Until a built-in /cd command is implemented, users may need to rely on external tools or scripts to manage the working directory, ensuring a seamless experience with Claude Code and other tools like MATLAB.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING