Files
orca/src/main/runtime
Adam ReedandClaude Opus 4.8 c80dc43ed2 Support respawn-pane in Claude Agent Teams tmux shim (#6771)
* Support respawn-pane in Claude Agent Teams tmux shim

Claude Code's pane backend spawns each teammate in two steps: it
`split-window`s a holding pane running `cat`, then `respawn-pane -k`s
that pane with the real teammate command. Orca's tmux dispatcher had no
`respawn-pane` case, so every teammate spawn failed with
`tmux: unsupported command: respawn-pane` and the real command was
dropped — agent teams were completely broken in Orca on current Claude
Code (2.1.x).

Honor respawn-pane by closing the placeholder terminal and re-splitting
from the pane's original origin/direction with the real command, keeping
the fake pane id stable so later send-keys/kill-pane/list-panes still
resolve. Panes now remember how they were split for faithful recreation.

Pure pane geometry/format helpers move to a sibling module to keep the
dispatcher within the 300-line cap.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* respawn-pane: create replacement before closing placeholder

Address review: closing the placeholder before the replacement split
succeeded could leave the fake pane id registered against a dead handle.
Split first; on cleanup failure, discard the new split and keep the
placeholder registered so send-keys/kill-pane/capture-pane still resolve.
Adds a regression test covering a failed respawn split.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 13:16:14 -07:00
..