◉CLAUDE LABJP
●CC 2.1.331 — 2.1.331 adds an API connectivity check to claude doctor and fixes MCP tool calls hanging for up to 30 minutes●SONNET 4.5 — Sonnet 4.5 retires from the Claude API on 11/30, 6 days left. Move to claude-sonnet-5-5●OFFICE — Users report the Microsoft 365 add-in disappearing seconds after install on macOS●NEW — New: Count how many input tokens one more tool costs with count_tokens●GEMINI 2.5 — Using Gemini 2.5 alongside Claude? From 12/1 requests reroute to newer models, billed at their rates. 7 days left●WORKBENCH — Trying the API in Workbench for the first time? Check the billing pages before you start●CC 2.1.331 — 2.1.331 adds an API connectivity check to claude doctor and fixes MCP tool calls hanging for up to 30 minutes●SONNET 4.5 — Sonnet 4.5 retires from the Claude API on 11/30, 6 days left. Move to claude-sonnet-5-5●OFFICE — Users report the Microsoft 365 add-in disappearing seconds after install on macOS●NEW — New: Count how many input tokens one more tool costs with count_tokens●GEMINI 2.5 — Using Gemini 2.5 alongside Claude? From 12/1 requests reroute to newer models, billed at their rates. 7 days left●WORKBENCH — Trying the API in Workbench for the first time? Check the billing pages before you start
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-code134automation110prompt-cacheworkflow43

✦ 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-05-02
Two Reasons Claude Code's Edit Tool Refuses — Multiple Matches vs. No Match
Claude Code's Edit tool fails in two distinct ways: the string matches in several places, or it matches nowhere. Here is how to tell them apart, how to build a good old_string, and how to check for formatters, line endings and invisible characters.
⟐ 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.