[BUG] New prompt from agents dashboard inherits the highlighted session's working directory instead of the shell's cwd

Open 💬 0 comments Opened Jun 4, 2026 by kapupasta

What's Wrong?

In the agents dashboard (the multi-session TUI view that groups sessions under "Needs input / Working / Completed"), typing a new prompt while a conversation row is highlighted starts the new session in that highlighted row's working directory — not in the directory the shell was cd'd into when claude launched.

Because each row displays its own folder, browsing/hovering rows silently changes where a new prompt will land. The result is new sessions unexpectedly starting in ~/ or an unrelated repo, with the wrong project context and wrong CLAUDE.md.

Likely a sibling of #64659 (new sessions attaching to an existing session's context), but the trigger here is dashboard row-highlighting rather than the remote-by-default setting.

What Should Happen?

A new prompt from the dashboard should start in the shell's current working directory (where claude was launched) — or there should be an explicit, visible affordance to choose the directory. Highlighting a row to read its status shouldn't silently redirect where new work starts.

Steps to Reproduce

  1. From a terminal cd'd into Project A (e.g. ~/foo), launch claude.
  2. Open the agents dashboard with multiple existing sessions listed, at least one rooted in a different directory (e.g. ~/ or ~/bar).
  3. Highlight/browse a row whose folder is not Project A.
  4. Type a new prompt and submit.
  5. Observe: the new session's working directory is the highlighted row's folder, not Project A.

Is this a regression? Unknown.

Claude Code Version: v2.1.161

Platform: Anthropic API / Claude Code CLI

Operating System: macOS (Darwin 25.5.0)

Terminal/Shell: zsh

Additional Information: No setting, flag, or keybinding currently overrides this behavior (confirmed against the official docs).

View original on GitHub ↗