Feature request: `claude agents` should support repo-scoped filtering that includes worktrees

Open 💬 0 comments Opened Jun 13, 2026 by karimn

Problem

claude agents --cwd <path> filters sessions by directory, but it doesn't automatically include sessions running inside git worktrees created under .claude/worktrees/. If you're working on a repo that uses worktrees for parallel agent tasks, you have to run a separate --cwd invocation for each worktree path to see all the relevant sessions.

Proposed Solution

Add a --repo flag (or make --cwd repo-aware) that, given a git repository root, automatically includes any sessions started under .claude/worktrees/** within that repo:

claude agents --repo /path/to/repo
# shows sessions from /path/to/repo AND /path/to/repo/.claude/worktrees/*/

Why This Matters

The worktree workflow (EnterWorktree / superpowers:using-git-worktrees) is a first-class Claude Code feature. When you have several parallel background agents each isolated in their own worktree, there's no single command to see all of them together. A repo-aware view would make managing multi-agent worktree sessions significantly easier.

Current Workaround

Manually call claude agents --cwd once per worktree path — tedious when you have many active worktrees.

View original on GitHub ↗