Allow --resume from any directory (decouple session resume from origination directory)

Open 💬 0 comments Opened Jul 6, 2026 by willcktam

Problem

When resuming a session with --resume <id>, Claude Code requires you to be in the same directory the session was originally started from. If you run it from a different directory, you get:

This conversation is from a different directory.

To resume, run:
  cd /original/dir && claude --resume <id>

This is unnecessarily rigid. Sessions often span multiple repos or directories, and requiring the user to cd back to the origination directory adds friction with no clear benefit — the session is identified by ID, not by CWD.

Requested behavior

Allow --resume <id> to work from any directory. Options:

  1. Override flag: support --resume <id> --cwd <path> to explicitly set the working directory for the resumed session.
  2. Relax the check entirely: don't enforce that CWD matches the session's origination directory as a precondition for resume. The user can always cd inside the session if needed.

Use case

Working across multiple related repos (e.g. two separate project directories) in a single ongoing session. Starting the next day from a different repo directory should not block resuming the previous session.

Workaround

cd /original/dir && claude --resume <id>

Works but requires remembering (or looking up) which directory the session originated from.

View original on GitHub ↗