[FEATURE] Nudge when a session's working directory looks mismatched from what's being discussed
Summary
When starting a new session, there's no check for whether the session's working directory actually matches the project the user is about to talk about — so it's easy to end up working in the wrong repo entirely, especially when juggling many similarly-named or similarly-themed projects. Please add a light nudge when a session's cwd looks mismatched from what the conversation is actually about.
Current behavior
Reviewing my own session list, several sessions show a title clearly describing one project while the session's actual working directory is a different project folder entirely — e.g. a session titled after one site opened under a generic Desktop cwd, another opened under an unrelated project's folder, and a project-name title appearing under a completely different project's directory. This isn't a one-off fluke; it recurs across multiple sessions, consistent with picking the wrong existing session/terminal tab to continue work in when managing many concurrent projects.
Motivation
I run 50+ repos and often have several sessions open across different projects on the same day. It's easy to type into the wrong window/session and not immediately notice, especially early in a conversation before any file paths get echoed back. By the time it's obvious (e.g. Claude reports "file not found" or edits land in an unexpected place), some back-and-forth has already happened in the wrong context.
Proposed behavior
- Lightweight mismatch signal. If the user's first message names a project/feature that doesn't match the session's
cwd(e.g. by comparing against repo names/READMEs of other known local projects), surface a small inline prompt: "This session is in~/CascadeProjects/X— did you mean to work in~/CascadeProjects/Y?" - One-click switch, not a hard block — dismissible, doesn't interrupt the flow if the match is a false positive.
- Should be conservative/low-noise — only fire on a fairly confident mismatch (e.g. an exact different-project name is mentioned), not on ambiguous or generic requests.
Why it matters
- Prevents wasted turns diagnosing "why isn't Claude finding this file" when the real issue is simply the wrong working directory.
- Particularly valuable for anyone managing many concurrent projects, where session/tab mixups are a matter of when, not if.
Related issues (adjacent, not duplicates)
- #63675
[BUG] Session working directory diverges from the directory Claude Code was launched from— a bug about the cwd itself drifting unexpectedly after launch; this request is about detecting a human mismatch (wrong session picked, not cwd drift within a session), a different failure mode.
Notes
- Reviewed for duplicates before filing (searched "session wrong directory cwd mismatch project") — existing results are about cwd drift within a session (a bug), not about proactively flagging that the user picked the wrong session/project to begin with, so this is a distinct ask.
- This should be purely advisory — false positives must be cheap to dismiss, since project-naming overlaps (e.g. shared component libraries referenced across multiple repos) are common and legitimate.