`claude agents` — expand `@` dispatch autocomplete to include non-git folders and folders without visible sessions

Open 💬 6 comments Opened May 13, 2026 by zentrolink-ivanzhukov

Background

Originally this issue asked for a way to start a new agent session in an arbitrary folder from inside the claude agents TUI, without dropping into a shell to cd and run claude manually.

@bogini (comment) pointed out that the dispatch input at the bottom of claude agents already partially covers this: typing @<repo> <prompt> starts a session in that repo.

That works well for the common case, but it leaves a specific gap, which is what this issue now tracks.

Current behavior of @ autocomplete

The @ autocomplete in the dispatch input only offers:

  1. Git repos that are siblings of wherever claude agents was launched (i.e. directories at the same level as the launch CWD that contain a .git), and
  2. Repos of sessions that are already visible in the current list.

The remaining gap

This means dispatch via @ cannot reach:

  • Non-git folders — plain working directories without a .git (notes folders, docs repos managed by other VCS, scratch dirs, etc.).
  • Folders that aren't siblings of the launch directory — anything elsewhere on disk, e.g. ~/work/... when claude agents was launched in ~/projects/....
  • Folders that don't yet have any agent session in the list — i.e. new projects where no session has ever been started, which is exactly the situation where the "open a terminal and cd there" round-trip is most painful.

So the original pain point — "start a session in a brand new project without leaving the TUI" — is only partially solved.

Desired behavior

Extend the @ autocomplete (and / or add a dedicated "new agent in folder X" action) so that the dispatchable set also includes:

  1. Non-git folders in the autocomplete candidates.
  2. All folders under ~/.claude/projects/ — every directory where Claude has been used before, regardless of whether it's a git repo or a sibling of the launch CWD.
  3. A "browse / type an arbitrary path" option for folders that have never been used with Claude before, so a fresh project is reachable without a shell round-trip.

The end-state behavior should be the same as today's @<repo> dispatch: after picking the folder, the new session starts with that folder as its CWD, appears in claude agents grouped under that folder, and writes its transcript to ~/.claude/projects/<encoded-cwd>/<session-id>.jsonl.

Why

  • For users running 10–30 projects (often a mix of git repos, non-git working dirs, and brand-new projects), the current autocomplete set is too narrow to reliably avoid the terminal round-trip.
  • The pain is most acute exactly where the gap is: new projects, where no session exists yet, and non-code folders (docs, notes, ops scratch) that aren't git repos.
  • Confirmed not unique — see @thnk2wn's comment: "some of my working folders aren't git repos and I'd love to be able to use claude agents more globally and not think much about where I launched it from."

Related

  • #58672 — claude agents --cwd (filtering the view, shipped in v2.1.141)
  • #58725 — /resume should include background sessions
  • #58591 — --cwd flag for claude --resume

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗