You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Faithful port of DeepSeek-Reasonix src/repair/storm.ts (66 LOC).
StormBreaker tracks (tool_name, args) tuples in a sliding window
(default window=6, threshold=3). When the same call appears
threshold times, the call is suppressed.
- Mutating calls (write, edit, bash) clear prior read-only entries
so a post-edit verify-read isn't flagged as a repeat.
- Storm-exempt tools (cheap inspectors) never trip the guard.
- First-time all-suppressed: self-correction — the model gets one
shot to self-correct with guard messages injected as tool results.
- Second-time all-suppressed: inner loop exits (model is stuck).
Tests: 12 tests ported from Reasonix tests/repair/storm.test.ts.
All 14 existing agent_loop::run loop tests still pass.
Build + fmt clean.
let all_suppressed = storm_report.all_suppressed(original_count);
277
+
278
+
// Port of Reasonix loop.ts:935-956 — first-time
279
+
// all-suppressed: self-correction. Stub tool
280
+
// results with a guard message and give the model
281
+
// one shot to self-correct before the loud-warning
282
+
// path.
283
+
if all_suppressed && !turn_self_corrected {
284
+
turn_self_corrected = true;
285
+
let guard_text = "[repeat-loop guard] this call was suppressed because it was identical to a previous call in this turn. Earlier results for it are above — try a meaningfully different approach, or stop and answer if you have enough.";
0 commit comments