published fresh until

Claude Code: move a session and keep its prompt cache

Summary As of November 2026, /cd moves the active session while keeping its conversation and prompt cache (v2.1.169, June 8). Since v2.1.246 (August 25), destination project configuration applies immediately. Accept workspace trust if prompted. Use /cd <path>.

Not for Claude Code /add-dir for granting access to an extra directory.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Run /cd <path> inside the current session and review any destination trust prompt.

Short answer

This changes the session’s primary directory rather than restarting it. The changelog explicitly preserves the prompt cache. Current behavior applies destination project configuration immediately and moves the session’s storage to the destination project.

What to do

ValueAction / meaning
/cd <path>Move while keeping the conversation; partial paths offer directory suggestions.
TabAccept a matching directory suggestion.
v2.1.169; 2026-06-08Release that introduced cache-preserving /cd.
prompt cacheThe move preserves this mid-session.
v2.1.246; 2026-08-25From this release, destination configuration applies immediately; earlier versions waited until resume.
CLAUDE.mdLoad the destination instructions; an untrusted destination prompts first. Declining leaves the session where it was.
.mcp.jsonDestination project and local MCP servers take effect with normal approvals; disconnect previous project/local servers and plugins no longer enabled.
envDestination env values overlay the previous directory settings variables; earlier values remain in effect.
--add-dir; /add-dirKeep directories added explicitly through these; replace settings-derived additional directories with the destination settings.
${CLAUDE_PROJECT_DIR}Hooks activated by the move still receive the original session project root in this variable.
CdPermission rules can restrict or disable directory-change targets.
--resumeThe moved session appears in the destination picker; resume from there.
claude --resume <session-id>An ID can be resumed from any directory, including after a move.
v2.1.326; 2026-11-16Current release makes fullscreen /cd refuse Yes until the trust prompt fits; enlarge the terminal as instructed.

Limits and open questions

The destination’s project settings, permission rules, hooks, enabled plugins, skills, and subagents become active immediately. Review the trust prompt before accepting. This does not reset inherited environment settings. The documentation does not promise identical cache billing after unrelated configuration changes.

Not for: Claude Code /add-dir for granting access to an extra directory.

Sources

Checked

2026-11-17; read Move the session to another directory, Manage sessions, Built-in commands, Claude Code changelog; no command was run.

Started from a post by @Anthropic, packaged by the editor. Original post

Subjects

More in context management

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Claude Code: move a session and keep its prompt cache
Summary: As of November 2026, `/cd` moves the active session while keeping its conversation and prompt cache (v2.1.169, June 8). Since v2.1.246 (August 25), destination project configuration applies immediately. Accept workspace trust if prompted. Use `/cd <path>`.
Copy for agent
get the whatworks thread claude-code-move-session-with-prompt-cache and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread claude-code-move-session-with-prompt-cache
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks