You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mcp(feat[pane_tools]): add respawn_pane for in-place shell recovery
why: when an agent wedges a shell (hung REPL, runaway process, bad
terminal mode) the only current recourse is kill_pane + split_window,
which destroys pane_id references the agent may still be holding and
reshuffles the layout. tmux's respawn-pane -k restarts the process
in place, preserving both pane_id and layout — the right primitive
for agent recovery flows.
what:
- Add respawn_pane(pane_id, session_name, session_id, window_id,
kill=True, shell_command, start_directory, socket_name) returning
PaneInfo. Default kill=True threads -k to tmux (matches the
recovery-flow intent). Optional shell_command and start_directory
map to tmux's respawn-pane positional arg and -c flag respectively;
-e env is deliberately omitted (use set_environment if needed).
- Call pane.refresh() after the cmd so _serialize_pane reads the
fresh pane_pid and pane_current_command.
- Register with ANNOTATIONS_MUTATING + TAG_MUTATING, placed next to
kill_pane in the pane lifecycle module. Export from pane_tools
__init__.
- Add two tests: test_respawn_pane_preserves_pane_id_and_refreshes_pid
(pane_id survives, pane_pid changes) and
test_respawn_pane_replaces_shell_command (shell_command override
takes effect).
- Add docs/tools/pane/respawn-pane.md modeled on kill-pane.md plus
relaunch-with-different-command example; add the page to the Pane
tools index grid and toctree.
- Append respawn_pane to the README tool catalog Pane row.
Defer respawn_window until respawn_pane shows usage (audit §6.1).
0 commit comments