fix(agent): honor stop hook retry budget#1501
Merged
Merged
Conversation
Remove the premature consecutive-end bypass so persistent Stop hook objections keep the run active until the configured bounded budget is exhausted. Tell agents to establish todo state before promising follow-up. Co-authored-by: Pinky <44b8e82baa6e0e254e0208d68f335c283c94e7b78dd1fa10d5a49d3f13dd0435@sprout-oss.stage.blox.sqprod.co> Signed-off-by: Wes <wesbillman@users.noreply.github.com>
wpfleger96
approved these changes
Jul 3, 2026
This was referenced Jul 3, 2026
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
end_turnbypass for_Stophook objectionsBUZZ_AGENT_STOP_MAX_REJECTIONSbounded budget is exhaustedWhy
An agent can acknowledge work, then immediately return
end_turnwhile its session remains active but idle. The existing_Stophook can detect open todo state, but the agent loop accepted a second consecutiveend_turneven when the hook objected again. That prematurely bypassed the configured retry budget.Validation
cargo fmt --all -- --checkcargo clippy -p buzz-agent -p buzz-acp --all-targets -- -D warningsbuzz-agenttest suite (244 unit tests plus integration suites)buzz-acptest suite (405 tests)