Skip to content
Claude Code adds /cd command to change directories mid-session | My AI Guide

Claude Code adds /cd command to change directories mid-session

By Harsh Desai
Share

TL;DR

Claude Code introduces the /cd command to move a session to a new working directory without breaking the prompt cache.

What changed

ClaudeCode now includes the /cd command for changing directories. Vibe Builders and Developers can shift sessions to new folders while keeping the prompt cache.

Why it matters

This update helps Developers maintain context when switching between multiple code directories in a single session. It offers an advantage over tools likeCursorthat often require full restarts for similar changes.

What to watch for

Compare the behavior against alternatives such as restarting sessions in VS Code with AI extensions. Verify the feature by running /cd in Claude Code and confirming the cache remains active afterward.

Who this matters for

  • Vibe Builders: Use /cd to pivot between asset folders without losing the context of your current design session.
  • Developers: Change working directories mid-session to manage monorepos while keeping your prompt cache intact.

Harshs take

The addition of /cd to Claude Code is a pragmatic win for terminal-based workflows. Prompt caching is expensive and slow to rebuild, so breaking it just to move from a frontend to a backend folder was a major friction point. This update brings the CLI tool closer to the fluid experience found in IDEs like Cursor.

Operators should stop treating AI CLI tools as static script runners. This feature signals a shift toward persistent, long-running stateful sessions. If you are still restarting your environment for every sub-task, you are burning tokens and time.

Use this to maintain a high-context thread across your entire project structure.

by Harsh Desai

Source:code.claude.com

About Claude Code

View the full Claude Code page →All Claude Code updates

Go deeper

More from Claude Code

Everything AI. One email.
Every Monday.

New tools. Model launches. Plugins. Repos. Tactics. The moves the sharpest builders are making right now, before everyone else.

No spam. Unsubscribe anytime.