[FEATURE] Auto-triggered agent view shows unscoped global session list, mixing unrelated projects
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
When a session is auto-backgrounded (e.g. a slash command dispatched as a new background session, or default subagent backgrounding), Claude Code drops me into the claude agents fleet view automatically — without me ever running claude agents myself. This view is unscoped by default and mixes sessions from unrelated projects (e.g. a waterpolo-game session shows rows from a separate BuildingDesigner project). The existing --cwd flag doesn't help, since it only applies when claude agents is invoked manually — not when the view is opened automatically by an auto-background transition.
Proposed Solution
When agent view opens as a result of an automatic background transition (not a manual claude agents invocation), it should default to showing only sessions belonging to the current project — or respect a settings.json key such as agents.autoViewScope: "project" | "global"
Or a command line option, I don't mind, but I must be able to lock down a claude instance to just one project somehow!
Alternative Solutions
_No response_
Priority
Medium - Would be very helpful
Feature Category
CLI commands and flags
Use Case Example
_No response_
Additional Context
Claude Code CLI v2.1.224
Model: Fable 5
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗