◉CLAUDE LABJP
●2.1.296 — Sonnet 5.5 cache reads drop to $0.10/Mtok (was $0.20), and the MCP description limit rises to 4,096 characters●2.1.295 — Hooks gain onFailure: "block", so a failed or timed-out hook no longer lets the action through●SONNET 4.5 — Retires on the Claude API on 11/30, 51 days left. Migrate to Sonnet 5.5●Q&A — A long-running report: the console jumps back to the top of history whenever output is appended●HAIKU 5.5 — Code written for Haiku 4.5 hits a 400 error on budget_tokens●NEW — When first requests keep missing, hand over a one-page description of your work first●2.1.296 — Sonnet 5.5 cache reads drop to $0.10/Mtok (was $0.20), and the MCP description limit rises to 4,096 characters●2.1.295 — Hooks gain onFailure: "block", so a failed or timed-out hook no longer lets the action through●SONNET 4.5 — Retires on the Claude API on 11/30, 51 days left. Migrate to Sonnet 5.5●Q&A — A long-running report: the console jumps back to the top of history whenever output is appended●HAIKU 5.5 — Code written for Haiku 4.5 hits a 400 error on budget_tokens●NEW — When first requests keep missing, hand over a one-page description of your work first
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-code132automation109prompt-cacheworkflow40

✦ 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 $15 for lifetime access
View Membership →

Related Articles

⟐ Claude Code2026-05-02
Stop the 'old_string is not unique' Error in Claude Code's Edit Tool — A Practical Rewrite Strategy
When Claude Code's Edit tool throws 'old_string is not unique in the file', the root cause is usually that the prompt didn't guarantee a uniquely identifiable target. Here's how to design rewrites that actually stick.
⟐ Claude Code2026-04-30
Composing Claude Code Skills — Building Automation a Single Skill Can't Reach
A practical guide to going beyond one-skill-at-a-time and composing multiple Claude Code Skills into real workflows. Pipeline, branching, and meta-skill patterns with full implementation examples and the failure modes you should design against.
⟐ Claude Code2026-03-28
Running Claude Code × Playwright E2E Tests in Production — Pitfalls and Decision Criteria
Implementation patterns for running E2E tests with Claude Code and Playwright in production, plus how to measure whether the investment pays back. Includes the Cloudflare Workers and Pages preview deployment pitfalls, and a decision framework that indie developers can use to judge whether E2E tests are worth the investment.
📚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