Skip to content

fix(agent): honor stop hook retry budget#1501

Merged
wesbillman merged 1 commit into
mainfrom
pinky/open-todo-stop-guard
Jul 3, 2026
Merged

fix(agent): honor stop hook retry budget#1501
wesbillman merged 1 commit into
mainfrom
pinky/open-todo-stop-guard

Conversation

@wesbillman

Copy link
Copy Markdown
Collaborator

Summary

  • remove the per-prompt consecutive end_turn bypass for _Stop hook objections
  • keep rerolling until the existing BUZZ_AGENT_STOP_MAX_REJECTIONS bounded budget is exhausted
  • require agents to open todo state before pickup acknowledgments and retain it through verified completion or blocker communication

Why

An agent can acknowledge work, then immediately return end_turn while its session remains active but idle. The existing _Stop hook can detect open todo state, but the agent loop accepted a second consecutive end_turn even when the hook objected again. That prematurely bypassed the configured retry budget.

Validation

  • cargo fmt --all -- --check
  • cargo clippy -p buzz-agent -p buzz-acp --all-targets -- -D warnings
  • full buzz-agent test suite (244 unit tests plus integration suites)
  • full buzz-acp test suite (405 tests)

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>
@wesbillman wesbillman enabled auto-merge (squash) July 3, 2026 15:48
@wesbillman wesbillman merged commit 1c297d2 into main Jul 3, 2026
29 checks passed
@wesbillman wesbillman deleted the pinky/open-todo-stop-guard branch July 3, 2026 15:50
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.

2 participants