Skip to content

feat(agent): stop the turn on a third identical verify failure#95

Open
davidrhodus wants to merge 1 commit into
feat/failure-process-hardeningfrom
feat/verify-stop-early
Open

feat(agent): stop the turn on a third identical verify failure#95
davidrhodus wants to merge 1 commit into
feat/failure-process-hardeningfrom
feat/verify-stop-early

Conversation

@davidrhodus

Copy link
Copy Markdown
Contributor

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=0 disables for A/Bs; verify_repeat_stopped telemetry + 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

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>
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.

1 participant