Allow specifying working directory when dispatching sessions from Agent View TUI

Status Closed — not planned
Maintainer reply None cached
Activity 4 comments · opened May 22, 2026 · closed Jun 23, 2026

Summary

When using Agent View (claude agents) to manage multiple Claude Code instances, there's no way to dispatch a new session into a different working directory from within the TUI. You have to exit, cd to the target directory in a separate terminal, run claude --bg, and switch back.

Motivation

When working across multiple projects or subdirectories in a monorepo, the current workflow requires leaving the Agent View to dispatch a session in a different directory. This breaks the flow of the centralized agent management experience.

Proposed solution

Allow specifying the target working directory when creating a new session from within the Agent View TUI — for example, via a directory picker or a text input when dispatching a new agent.

Related issues

  • #49429 — Session-scoped working directory / git branch state
  • #61366 — Allow /branch and --resume to target a different working directory
  • #50302 — Allow switching project context mid-session

View original on GitHub ↗

4 Comments

giruuuuj · 4 months ago

Analysis

This is a feature request for the Agent View TUI to accept a target working directory when dispatching new sessions. Currently, the TUI spawns all sessions in the directory where claude agents was launched. To start a session in a different directory, users must open a separate terminal, cd to the target, and run claude --bg.

Implementation approaches

  1. Directory picker on dispatch: When creating a new agent from the TUI (e.g. <kbd>a</kbd> or equivalent), show a directory input prompt. The user types or tabs-completes a path, and the new session is spawned with that cwd.
  1. --cwd flag for claude agents: Allow claude agents --cwd <path> to set the default working directory for all sessions dispatched from that TUI session. Combined with multiple TUI instances (one per project), this covers the multi-project workflow without modifying the TUI itself.
  1. Per-session /cwd command: A mid-session slash command /cwd <path> that changes the session's working directory (similar to /compact or /clear). This was proposed in #50302.

Workaround (current)

No single-terminal workaround exists. Use multiple terminals or tmux panes:

# Terminal 1: project A
cd ~/project-a && claude agents

# Terminal 2: project B
cd ~/project-b && claude agents

# Terminal 3: project C
cd ~/project-c && claude --bg

Each Agent View TUI only manages sessions in its own working directory.

github-actions[bot] · 3 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

arunkumarchithanar · 2 months ago

Not having this feature is annoying. Logically the TUI presents agents started from every directory. For dispatching, however, I have to open another terminal, and make a claude session. Unintuitive. I'm assuming having Claude code would help implementing this feature.

github-actions[bot] · 16 days ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.