Fix executor nudge misdelivered to shell pane when detail view is open#553
Merged
Conversation
When the detail view is open, the UI's joinTmuxPane moves the agent pane out
of the daemon window into the task-ui session. The four "continue working"
resume nudges targeted windowTarget+".0", which after the join resolves to the
shell pane (or a now-destroyed window) — so the agent never receives the nudge
and the task silently stalls ("executor randomly stopped working").
Resolve the send-keys target from the persisted claude_pane_id (the same stable
%pane_id the UI already uses for capture), falling back to windowTarget+".0".
- Add agentSendTargetForPane (pure, unit-tested) + Executor.agentSendTarget
- Wire into resumeClaude{Dangerous,Safe} and resume{Codex,Gemini}WithMode
Verified end-to-end by driving the real TUI: opening the detail view fires
joinTmuxPane, after which the legacy window-relative target no longer resolves
while the persisted pane id reaches the agent.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
45df68c to
0f1bbc8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Tasks would silently stall — "the executor randomly stopped working." When a task's detail view is open, the UI's
joinTmuxPanemoves the agent pane out of the daemon window into thetask-uisession. The four "continue working" resume nudges targetedwindowTarget+".0", which after that join resolves to the shell pane (or a now-destroyed window). The agent never receives the nudge, so it sits idle forever.This is independent of the Claude Code version — a latent pane-targeting bug (same class as the codebase note about preferring
claudePaneIDovercachedWindowTarget).Fix
Resolve the send-keys target from the persisted
claude_pane_id(the same stable%pane_idthe UI already uses for capture, written bysavePaneIDs), falling back towindowTarget+".0".agentSendTargetForPane(claudePaneID, windowTarget)— pure, unit-testedExecutor.agentSendTarget(taskID, windowTarget)— reads the persisted idresumeClaudeDangerous,resumeClaudeSafe,resumeCodexWithMode,resumeGeminiWithModeTest plan
go test ./internal/executor/— green (newTestAgentSendTargetForPane+ full suite)joinTmuxPane; afterward the legacy targettask-daemon-*:task-N.0no longer resolves, while sending to the persisted pane id reaches the agent.A repeatable harness for this kind of real-TUI QA is in a companion PR (
scripts/qa/).🤖 Generated with Claude Code