Safety: /resume shows sessions from all directories — risk of modifying wrong project
Problem
The /resume command shows sessions from all projects/directories by default, not just the current working directory. A user in project B can accidentally resume a session from project A, causing the agent to read/modify files in the wrong codebase.
This is a safety issue, not just a UX inconvenience — the resumed agent retains the original session's context but operates in the current terminal's working directory.
Steps to reproduce
- Start a Claude Code session in
/path/to/project-a, do some work, exit cd /path/to/project-b- Start Claude Code, type
/resume - The picker shows sessions from project-a and all other directories by default
- Selecting a project-a session resumes it while the working directory is project-b
Current behavior
The /resume picker defaults to showing all sessions across all directories. Filtering controls exist in the footer:
Ctrl+A— narrow to current directory onlyCtrl+B— filter to current branchCtrl+W— filter to current worktree
However, these filters do not persist between invocations — every /resume resets to showing everything.
Expected behavior
- Default to current directory only — the safe default is scoped, not global
Ctrl+A(or similar) to expand to all directories when intentionally needed- Persist the user's filter choice across invocations, or at minimum default to the safe option
The current default inverts the safety model: the dangerous action (cross-directory resume) is the default, and the safe action requires an extra keystroke every time.
Environment
- Claude Code CLI
- Discovered while running multiple agent sessions across different project directories
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗