CLAUDE LABJP
DESIGN — Claude Design gets a major update: design-system imports, direct canvas editing, and more export formatsCODE — Claude Design can start from your local codebase and hand a design off to Claude Code to implementFABLE — Fable 5, a Mythos-class model made safe for general use, is now available in Claude Code v2.1.170FIX — Mid-stream connection drops now preserve partial responses instead of showing a raw errorSCROLL — A new wheelScrollAccelerationEnabled setting disables mouse-wheel scroll acceleration in fullscreenTIER — The Claude Design beta is available to Pro, Max, Team, and Enterprise customersDESIGN — Claude Design gets a major update: design-system imports, direct canvas editing, and more export formatsCODE — Claude Design can start from your local codebase and hand a design off to Claude Code to implementFABLE — Fable 5, a Mythos-class model made safe for general use, is now available in Claude Code v2.1.170FIX — Mid-stream connection drops now preserve partial responses instead of showing a raw errorSCROLL — A new wheelScrollAccelerationEnabled setting disables mouse-wheel scroll acceleration in fullscreenTIER — The Claude Design beta is available to Pro, Max, Team, and Enterprise customers
Articles/Claude Code
Claude Code/2026-06-18Advanced

Claude Code Adds /cd — Carrying Your Warm Cache Across Repositories

Claude Code's new /cd moves a running session to another working directory without rebuilding the prompt cache. Here are the design calls and pitfalls when you sweep across several repositories in one sitting.

claude-code120automation69prompt-cacheworkflow32

Premium Article

Some mornings I work through a handful of repositories one after another.

As an indie developer running the several sites behind Dolice Labs, I used to close the session after each repo and spin a fresh one up in the next directory. The moment I restarted, something disappeared: the prompt cache that had just warmed up. I re-fed the same context, repeated the same setup, and paid the wait and the tokens all over again.

On June 18, 2026, Claude Code added /cd — a command that moves a running session to a different working directory. It looks modest, but for anyone sweeping across repositories it reshapes the very structure of latency and cost.

The friction of being pinned to one directory

Before /cd, a cross-repo sweep looked roughly like this.

# Handle repo A → end the session
claude --resume   # resume in directory A, cache is warm
 
# To move to repo B, fold the session, cd, and relaunch
cd ../repo-b
claude            # a cold start. the prompt cache is discarded and rebuilt

The problem is that last line. Changing directories meant relaunching the process, which dropped both the conversation context and the cache.

Because tools operate from cwd, relaunching was the safe way to touch another repo's files. But every relaunch re-reads the system prompt and the project conventions. With four repositories, you pay that startup cost four times.

What /cd actually changes

/cd swaps the working directory while keeping the running session intact. Four behaviors are worth holding onto.

AspectWhen restartingWith /cd
Prompt cacheDiscarded and rebuiltPreserved, not rebuilt
Conversation contextBrokenContinues
Destination CLAUDE.mdLoaded as system promptAppended as a message
Session storageIndependent per directoryRelocated to the destination project

The first two of these have the largest effect on how a sweep feels.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
Understand exactly how moving directories without restarting keeps a warm prompt cache alive, and how that lands on both cost and latency
Account for the fact that the destination CLAUDE.md is appended as a message rather than replacing the system prompt, so your instructions never quietly collide across repos
Build a post-session hook that pushes teardown work — log writes, .next cleanup — onto Claude Code itself, with a working settings.json example
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

Claude Code2026-04-22
Auto-Generating Conventional Commits with Claude Code — Letting it Infer Type and Scope from the Diff
Are your commit messages starting to look like a wall of update and fix? Here's a small, stable setup that lets Claude Code read your staged diff and turn it into proper Conventional Commits.
Claude Code2026-03-24
Claude Code Hooks— Practical Techniques to Automate Your Dev Workflow
Learn how to automate your development workflow with Claude Code Hooks. From PreToolUse and PostToolUse configuration to automated code review, security checks, and deployment pipeline integration.
Claude Code2026-06-18
Give an Unattended Agent Only the MCP Tools It Needs — Enforcing a Deny-by-Default Policy
An unattended Claude Code agent can't lean on a permission prompt, so whatever a tool can reach becomes the blast radius. Here's how to lock MCP servers and tools down to deny-by-default and hand back only what the job needs, with managed-settings.json examples.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →