Skip to content

Spawn extra task agents through the backend-neutral pane seam - #1239

Merged
h0x91b merged 1 commit into
mainfrom
fix/dev3-native-extra-agent-spawn
Aug 3, 2026
Merged

Spawn extra task agents through the backend-neutral pane seam#1239
h0x91b merged 1 commit into
mainfrom
fix/dev3-native-extra-agent-spawn

Conversation

@h0x91b

@h0x91b h0x91b commented Aug 3, 2026

Copy link
Copy Markdown
Owner

The "+ Agent" action was the third launch path still splitting dev3-<taskId> unconditionally: spawnAgentInTask called tmux.splitWindow directly, so on a native-backed task there was no such session and the launch failed the same way Find bugs (#1228) and AI Review (#1229) did.

It now goes through splitTaskPane — the bare primitive, not an auxiliary purpose, because "+ Agent" deliberately allows several coexisting agent panes while a purpose owns at most one.

  • Native: a real coordinator pane, no tmux call and no probe of the default tmux socket.
  • Native: no sessionState.panes entry, which is the tmux pane registry handlePaneExited reconciles against live tmux panes — a native pane id there would be a permanent phantom. The agentId/configId write is unchanged on both backends.
  • tmux: the same split-window -h with the same -c/-t/-e and the same pane-registry append; the only delta is the seam's DEV3_TASK_SEQ env var, which every other extra pane already carries.
  • A dead terminal now reports "the task terminal is not running, so there is no pane to split — start the task first." instead of a tmux socket error, and a failed split leaves no pane and no task write.

Verified live on a native task (extra pane opens beside the agent, both halves equal, second Claude process running, zero tmux sessions for the task, no phantom pane record) plus new regression cases through the real RPC entry point.

@h0x91b
h0x91b merged commit 79d0301 into main Aug 3, 2026
9 checks passed
@h0x91b
h0x91b deleted the fix/dev3-native-extra-agent-spawn branch August 3, 2026 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant