D:/Program Files/Git/resume picks session from wrong project directory (showAllProjects defaults to true)

Resolved 💬 5 comments Opened Apr 11, 2026 by Jemiking Closed Apr 18, 2026

Bug Description

/resume in Claude Code CLI resolves sessions from all projects by default instead of scoping to the current working directory's project. This causes "cross-contamination" where running /resume in Project A shows and auto-selects sessions from Project B.

Steps to Reproduce

  1. Work in Project A (e.g., D:\Dev\Projects\Lzhan) — creates sessions under ~/.claude/projects/D--Dev-Projects-Lzhan/
  2. Switch to Project B (e.g., D:\Writing\...) — creates sessions there
  3. Return to Project A directory
  4. Run /resume
  5. Expected: picker defaults to showing only Project A sessions
  6. Actual: picker shows ALL projects' sessions (showAllProjects defaults to true), and the most recent session from Project B appears first

Root Cause

In the ResumeCommand component (minified as jE_), the showAllProjects state defaults to true:

// Current (bug):
[O, D] = h4.useState(!0)   // showAllProjects = true

// Expected (fix):
[O, D] = h4.useState(!1)   // showAllProjects = false

The picker component (Js8) has proper project-scoped filtering logic — it just isn't activated by default because showAllProjects starts as true.

When showAllProjects is false, the picker correctly filters:

if (!O && D && AH) {
    let u$ = i.length > 0 ? i : [KH];
    m6 = m6.filter((w_) => {
        let sK = w_.projectPath;
        return u$.some((L$) => sK === L$ || sK.startsWith(L$ + sep));
    });
}

Proposed Fix

Change the default value of showAllProjects in ResumeCommand from true to false. Users can still toggle to "show all projects" manually in the picker.

Environment

  • Claude Code CLI v2.1.101
  • Windows 11 Pro
  • Multiple projects used in alternating sessions

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗