zz_

21ea091a ยท zzmq.dev@gmail.com/zz

Commit

21ea091ac2e759fec52584f166bda6f2680752d2

Fix two real failure modes from an observed 18x retry loop A pasted transcript showed the actual root causes behind the repeated claim/retry pattern (now also fixed by the lease change): 1. The model would describe a plan in prose ("I'll implement X and test it") and then simply stop without calling a single tool -- runAgent read that as "no tool calls = finished", silently returning success even though the ask was never answered. runAgent now takes an isActuallyDone() check instead of trusting a stop at face value; work.ts supplies the real one (does the lane now have an ANSWER for this ask), and nudges (bounded, same as the error path) when it's false. 2. After a tool call failed (ask_answer missing "repo"), the model's next turn blamed a *different*, already-succeeded call (run_in_sandbox) and retried that instead -- a real misattribution, not just carelessness. The nudge message now names the specific failing tool and its exact error text, rather than a generic "your last call failed", to make misattribution harder. Verified both with mocked model responses (deterministic, not relying on live Ollama's own run-to-run variance). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

Troy Howard <thoward37@gmail.com> -- 2026-10-10T11:32:17.000Z

Tree at this commit