Answer the rate-limit menu while WAITING; ignore rolled-forward stale banners - #20
Merged
Conversation
… banners Two bugs from the daybreak-1 run, where the watchdog slept through Claude's "What do you want to do?" rate-limit menu and then detached at reset time: - Only RUNNING and LIMITED scanned for auto-responses, so a menu that drew a tick after the limit banner sat unanswered for the entire wait. onWaiting now runs the same scanAutoResponses/scanAutoAnswerPrompt pass. - onResuming counted any new-looking limit line as a re-hit. A bare-clock banner from the event just waited out, worded differently from the line that latched, re-parsed after the reset as tomorrow's time — a 24h wait that exceeded max_wait and detached. The re-hit check now applies the same IsNextDayRollForward guard onRunning already used. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
Fixes the daybreak-1 failure where the watchdog never answered Claude's "What do you want to do?" rate-limit menu and then detached right at reset time.
scanAutoResponses, so a menu that drew a tick after the limit banner (the supervisor moves LIMITED → WAITING within one poll) sat unanswered for the whole wait and swallowed the resume prompt.max_waitand detached the watchdog. The re-hit check now applies the sameIsNextDayRollForwardguardonRunningalready used.From the actual run log:
Tests
TestAutoResponseAnswersMenuThatAppearsWhileWaiting— menu draws during WAITING, asserts1\ris injected and the wait continues.TestResumingIgnoresRolledForwardStaleBanner— post-reset banner resolving to tomorrow's time confirms the resume instead of re-waiting.Both reproduce the log sequence above and fail without their fixes.
go build ./...andgo test ./...pass.🤖 Generated with Claude Code