[BUG] claude -c resumes the globally most recent session, ignoring the current project directory

Status Open
Reported on v2.1.280
Maintainer reply None cached
Activity 0 comments · opened Sep 25, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

claude --continue (-c) is documented to resume the most recent session in the current directory. Instead it appears to resume the most recently modified transcript across all projects under ~/.claude/projects/, regardless of the working directory.

Steps to Reproduce

cd ~/projectA → run claude, have a conversation, exit
cd ~/projectB → run claude -c
The session from projectA is loaded, even though projectB has its own sessions on disk

What Should Happen?

claude -c resumes the most recent session belonging to the current working directory (i.e. from ~/.claude/projects/<encoded-$PWD>/ only), or reports that none exists.

Error Messages/Logs

The session from the other project is loaded. The selection appears to be driven by global file mtime rather than by the encoded $PWD scope.

Steps to Reproduce

Both directories have their own distinct entries under ~/.claude/projects/, each with their own .jsonl transcripts — so this is not a worktree/same-project collision:

~/.claude/projects/-home-jch-kaisa-app-backend/
71dedcf0-....jsonl 572980 Sep 15 12:30
b1600f41-....jsonl 31794367 Sep 23 16:52 <-- globally newest

~/.claude/projects/-home-jch-kaisa-data-read-text-from-url/
ab5c6d4a-....jsonl 646307 Sep 16 09:52
718c67a8-....jsonl 12556200 Sep 23 15:52

Running claude -c from ~/kaisa-data/read_text_from_url loads b1600f41, which belongs to -home-jch-kaisa-app-backend and is simply the newest .jsonl on disk overall.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.280

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Windows Terminal

Additional Information

Similar scoping behavior was reported in #46445 (2.1.101, now closed). This may be a
regression of the same code path, though the symptom differs: #46445 was about the
/continue and /resume pickers listing sessions from all projects, whereas here
claude -c silently resumes a session from another project without any picker.
#51658 reports a similar-sounding directory-scoping regression in the --resume
picker (2.1.104), but explicitly states --continue (-c) was unaffected at the time:
"--continue (-c) is still correctly scoped to the current directory. Only the
--resume picker is affected." This report shows -c itself now silently resuming
the wrong project's session with no picker involved (2.1.280) — either a newer
regression, or the two bugs share a root cause in the directory-scoping logic that
#51658 didn't fully capture.

View original on GitHub ↗