Problem
When running claude agents from inside a project directory, the agent session list currently shows all agentic sessions across all projects on the machine. There is no way to filter the list to the project I'm currently in.
For users who run Claude across many unrelated projects (different repos, different working directories), this makes the list unusable as a per-project task tracker. The view conflates contexts that should be kept separate.
Current behavior
cd ~/projects/foo
claude agents
# → shows sessions from ~/projects/foo, ~/projects/bar, ~/work/baz, etc., all mixed together
Desired behavior
By default, claude agents invoked from a directory shows only sessions whose original CWD matches the current project root (or current working directory).
Optional flags to broaden the view explicitly:
claude agents --all — current behavior (every session, every project)
claude agents --scope=cwd — only sessions started in the exact current directory
claude agents --scope=project (default) — sessions whose CWD is under the current project root, detected via nearest .git parent or similar
claude agents --scope=global — same as --all
A config key in ~/.claude/settings.json could set the default scope (agents.defaultScope: "project" | "cwd" | "global").
Why
- Each project has its own conversational context, its own goals, its own tasks. Mixing them obscures rather than informs.
- It's the natural mental model — every other dev tool that lists "open work" (VS Code recent, JetBrains projects, git status, tmux sessions) operates within a project scope by default.
- For users running 10–30 projects with concurrent Claude sessions, the global list rapidly becomes unreadable.
Related
claude --bg and the background service introduced in 2.1.139 make multi-project agent work much more practical. Per-project scoping in the agents view is the natural completion of that workflow.
Thanks for considering!
Problem
When running
claude agentsfrom inside a project directory, the agent session list currently shows all agentic sessions across all projects on the machine. There is no way to filter the list to the project I'm currently in.For users who run Claude across many unrelated projects (different repos, different working directories), this makes the list unusable as a per-project task tracker. The view conflates contexts that should be kept separate.
Current behavior
Desired behavior
By default,
claude agentsinvoked from a directory shows only sessions whose original CWD matches the current project root (or current working directory).Optional flags to broaden the view explicitly:
claude agents --all— current behavior (every session, every project)claude agents --scope=cwd— only sessions started in the exact current directoryclaude agents --scope=project(default) — sessions whose CWD is under the current project root, detected via nearest.gitparent or similarclaude agents --scope=global— same as--allA config key in
~/.claude/settings.jsoncould set the default scope (agents.defaultScope: "project" | "cwd" | "global").Why
Related
claude --bgand the background service introduced in 2.1.139 make multi-project agent work much more practical. Per-project scoping in the agents view is the natural completion of that workflow.Thanks for considering!