feat(agent): stop the turn on a third identical verify failure#95
Open
davidrhodus wants to merge 1 commit into
Open
feat(agent): stop the turn on a third identical verify failure#95davidrhodus wants to merge 1 commit into
davidrhodus wants to merge 1 commit into
Conversation
A/B data across ~1,000 runs made the case: when a failure signature survives one normal repair AND one diagnose-first repair unchanged, recovery is 0% (weak models) to negligible (strong models), and each further round only burns tokens — the weak-model experiment measured +36% cost on exactly these doomed loops. On the third identical failure the turn now ends honestly (stalled/incomplete, explicit status) instead of nudging another round. The previous round's escalated nudge stays as context — its output is identical by definition — and the transcript ends on the model's last attempt, clean for a follow-up /retry or continue. Kill switch HI_VERIFY_REPEAT_STOP=0 for eval A/Bs; consecutive-repeat tracking lives in the Verifier next to the signature state; new verify_repeat_stopped telemetry + report key. Failures with changing signatures never trigger it. 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.
Stacked on #88. Implements the follow-up that PR #88 deferred pending telemetry — and the telemetry arrived: in the weak-model A/B (qwen2.5-coder:7b, 120 runs), 18/24 vloop runs entered repair, 0% recovered in either arm, and the richer nudges added +36% tokens per doomed run (sign p=0.004). The paper's Finding 10 ("continuing to repair rarely helps — cap the effort") applies to our nudges too.
Policy: a failure signature that survives one normal repair and one diagnose-first repair unchanged ends the turn honestly (stalled/incomplete + explicit status) instead of running another round. Changing signatures never trigger it. The previous escalated nudge stays in context (identical output by definition); the transcript ends on the model's last attempt.
HI_VERIFY_REPEAT_STOP=0disables for A/Bs;verify_repeat_stoppedtelemetry + report key track firings.Tests: stop-at-third proven by provider exhaustion (a fourth round would panic the Canned provider), varying-failure and escalation-only paths locked.
🤖 Generated with Claude Code