Skip to content

Don't false-block tasks when a tmux status check transiently fails#558

Open
kylecarbonneau wants to merge 1 commit into
bborn:mainfrom
kylecarbonneau:fix/poll-tmux-transient
Open

Don't false-block tasks when a tmux status check transiently fails#558
kylecarbonneau wants to merge 1 commit into
bborn:mainfrom
kylecarbonneau:fix/poll-tmux-transient

Conversation

@kylecarbonneau
Copy link
Copy Markdown

Problem

pollTmuxSession marks a task blocked ("Task needs review") the moment a single tmux list-panes check fails. But that command also fails transiently — when the tmux server is briefly busy, or its 3s timeout trips under load. Because every running task's poller hits the same tmux server, a momentary stall makes them all misfire at once, false-blocking healthy, actively-running tasks simultaneously (regardless of permission mode).

Fix

Require missingThreshold (3) consecutive failed window checks before concluding the window is gone, and reset the counter on any successful check. A transient blip can no longer false-block a healthy task; a genuinely-closed window is still detected (~3s later).

Testing

go build ./... and go vet ./... clean; go test ./internal/executor/... passes. No behavior change for the legitimate "window really closed" path — same final-status resolution, just gated behind the consecutive-miss threshold.

pollTmuxSession treated a single failed 'tmux list-panes' as 'window gone'
and marked the task blocked ('Task needs review'). That command also fails
when the tmux server is briefly busy or the 3s timeout trips under load;
because every concurrent poller shares one tmux server, a momentary stall
made them all misfire at once — a false, simultaneous mass-block of healthy
running tasks regardless of permission mode.

Require missingThreshold (3) consecutive failed checks before concluding the
window is gone, and reset the counter on any successful check.
@kylecarbonneau kylecarbonneau force-pushed the fix/poll-tmux-transient branch from 85e514a to 213336a Compare June 6, 2026 15:19
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