fix(daemon): auto-continue scans every agent slot window, not just slot 1#56
Closed
AliHamzaAzam wants to merge 1 commit into
Closed
fix(daemon): auto-continue scans every agent slot window, not just slot 1#56AliHamzaAzam wants to merge 1 commit into
AliHamzaAzam wants to merge 1 commit into
Conversation
…ot 1 The watcher captured one pane per lane via the lane's default window name, so a usage-limit pause in slot 2+ (lane-N-2, lane-N-3, ...) never reached detect_usage_limit: no tracking, no RateLimited status, no resume. Scan every managed window individually, send keys and the continue message to the specific paused window, key the schedule and the public rate_limits map by window, and overlay the pause onto the session bound to that window (falling back to the first managed session when the pairing is momentarily unknown). The C toggle stays lane-scoped. Verified live in an isolated instance: a fake agent paused in lane-1-2 was detected and resumed while slot 1 received no stray keys.
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
Auto-continue never fired for agents in slot windows. The watcher enumerated lanes (slot windows counted for enumeration since an earlier fix) but then captured via
tmux.capture(lane, ...), which resolves to the lane's slot-1 window. A rate-limit pause inlane-N-2+ was invisible: no detection, noRateLimitedstatus, no log lines, no resume. Found live: an agent inlane-81-4sat on "You've hit your session limit · resets 7am" for six hours past its reset.Fix
managed_windowsreplaces the lane-deduped scan).rate_limitsmap by window; send menu keys and the continue message to the specific paused window.tmux_window(previously: always the first non-external session), with a fallback so a momentarily-unpaired window still surfaces.Ctoggle still disarms all of a lane's slots.Testing
managed_windows_scans_every_slot_window(failed before the fix); full workspace suite + clippy green.lane-1-2while a healthy agent runs inlane-1; the daemon detected, chose the window correctly, typedcontinue, and the slot-2 agent resumed with zero stray keys in slot 1.Note
Stacked on #55 (touches the same rpc.rs region); retarget to main after it merges. Deploying this fixes the currently-stuck agent on next daemon restart, with one caveat: a stale limit message whose reset passed more than the parse grace ago schedules for the next day, so a long-stuck agent may still want one manual
continue.🤖 Generated with Claude Code