Resume session picker: prioritize sessions from current working directory
Problem
The current resume session picker groups sessions by local vs remote. When working across multiple projects, finding "the session I had in this repo" requires scanning all local sessions regardless of which directory I'm currently in.
Proposed solution
Add a primary grouping by current working directory. Sessions started in the current pwd (or any subdirectory of it) should appear first in the picker as their own visually distinct group. All other local sessions follow, ordered by recency.
Conceptually, the picker would render something like:
This directory (/path/to/current/project):
- session-abc | "Implementing the parser" | 2 hours ago
- session-def | "Debugging the test suite" | yesterday
Other local sessions:
- session-ghi | "Refactoring auth module" | last week
- session-jkl | ... | ...
Remote sessions:
- ...
Why this matters
When jumping between projects, the most relevant session is almost always one started in the current directory. Today this requires scanning through unrelated sessions to find the right one, which gets worse as the local session count grows.
Reference
Claude Code handles this well: it surfaces sessions from the current working directory first, making "resume what I was doing in this repo" a one-step action.
Additional notes
- The "match current directory" check could include parent matches (if
pwdis inside a session's working directory) and child matches (sessions started in subdirectories ofpwd). - The existing local/remote split is still useful, this would layer on top of it, not replace it.
This is now supported. The resume session picker groups sessions by relevance to the current working directory by default, so sessions tied to the same branch, repository, git root, or directory surface above unrelated sessions under section headers like "This branch", "This repository", "This git root", "This directory", and "Other sessions". You can also press s to cycle sort modes between relevance, last-used, created, and name. If you believe this isn't resolved, please comment with details and we'll take another look.