[FEATURE] Agent view: mark several sessions and send one reply to all of them (plus `claude send`)
Problem
Agent view (research preview, tested on v2.1.281) is the place to watch and steer many background
sessions, but every input surface is single-target:
- The dispatch input at the bottom starts a new session per prompt ("Every prompt you enter here
starts its own new session", agent-view docs).
- The peek panel reply goes to one selected row.
- The only group action is
Ctrl+Xon a group header, which deletes the group. - The CLI has
agents,attach,logs,stop,respawn,rm, but no way to hand text to a
running session. claude attach <id> takes no prompt argument.
Common situations where one prompt must reach N sessions: "post a status update and continue",
"stop after the current step, main moved", "switch to the new branch name", "re-read
CLAUDE.md, the rules changed", "reply READY when idle". Today that means attaching to each session
in turn and pasting, or scripting tmux around claude attach.
Proposed UX
In agent view
m(orSpacewith a modifier) toggles a mark on the selected row;Mmarks every row in the
current group; marked rows show a marker in the status column and the footer shows 3 marked.
- With marks set, the peek-panel reply input reads
Reply to 3 marked sessionsandEntersends
the same text to each marked session, exactly as if typed there (same delivery path as the
existing single-row reply, including the "saved and sent as its next prompt" fallback for
sessions whose process is down).
- A per-row result line (
sent/queued/saved for restart/failed: <reason>) appears
in the peek panel; Esc clears marks.
- Marks never enable destructive actions:
Ctrl+Xkeeps acting on the selected row/group only.
From the shell
claude send <id> [--file F] "<prompt>" # one session, same path as the peek-panel reply
claude send --all [--state done,blocked] [--cwd P] [--name GLOB] "<prompt>"
claude send --ids a,b,c "<prompt>"
--json prints one row per target with the delivery state; exit non-zero if any target failed.--dry-run lists targets without sending. Reads the prompt from stdin when no argument is given,
so cat brief.md | claude send --all works. Should reuse the existing supervisor delivery that the
peek panel already uses, so it works for background sessions whether or not a terminal is attached.
Why the current workarounds fall short
- Attach + tmux paste (what my
cc-broadcastwrapper does): needs tmux, ~5–9 s per target to
render the prompt, detects readiness by scraping screen text (❯, footer, the
"Session is starting" banner) that changes across versions, and restarts any stopped session
as a side effect of attaching.
- Cross-session messaging via a headless
claude -prelay usingSendMessage: the recipient
is told the message came "from another session, not from you", so it cannot answer permission
prompts, slash commands arrive as text, and recipients spend a turn replying to the relay. Only
"queued" is confirmed synchronously; a bypass-mode recipient holds the message unless
crossSessionInbound: accept; identical repeats are throttled. Addressing is by session name and
the ListAgents [ref] is not the agent-view id, so scripts cannot disambiguate same-named
sessions (#93515 is adjacent).
- Channels must be enabled at launch with
--channels, so they cannot reach sessions that are
already running.
~/.claude/jobs/*is documented as "not a stable interface"; the inbox socket payload is
undocumented.
Related
- #24947
claude inject(closed 2026-04-07 after channels shipped; channels don't cover
already-running sessions or fan-out)
- #53049 external message injection API (closed as duplicate of #35072, which went stale)
- #93515 ListAgents / cross-session messaging: expose user-assigned session titles
- #95954 cross-session messages leak between unrelated sessions
Environment
Claude Code 2.1.281, macOS 27 (arm64), tmux 3.7c. Agent-view docs and cross-session-messaging docs
as of 2026-09-26.
🤖 Generated with Claude Code
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗