Fail runs when tool repair budget is exhausted - #969
Merged
Y1fe1Zh0u merged 1 commit intoAug 14, 2026
Conversation
A depleted Tool repair budget previously parked the Run in waiting_user, leaving users with an apparently active task and only a plain assistant message. Treat the exhausted budget as a structured terminal failure so the existing run_failed delivery and frontend error paths are used. Constraint: Historical waiting_user checkpoints for repair exhaustion must remain resumable. Rejected: Add a special frontend waiting card | the exhausted repair budget is not recoverable without starting a new turn and should release the Run lane. Confidence: high Scope-risk: narrow Directive: Keep repair-budget exhaustion terminal unless a bounded automatic recovery mechanism is introduced. Tested: 62 Runtime node, checkpoint, chat stream, and repair budget tests; scoped Ruff; git diff --check. Not-tested: Live WebSocket rendering against the deployed frontend.
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.
What changed
waiting_userto terminalfailed.Why
The previous behavior left the Run parked in
waiting_user. The backend delivered a plain assistant message, while the UI could continue looking active and the Run retained its lane. A depleted repair budget is an execution failure and should use the existingrun_failedand frontend runtime-error path.Compatibility
The legacy resume handler remains in place so already-persisted repair-limit
waiting_usercheckpoints can still be resumed. New runs terminate instead.Validation
git diff --checkpassedKnown gap
Live WebSocket rendering against the deployed frontend was not exercised.