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
Detect and abort runaway loops where the model repeats the same tool call (same tool + same input) N times consecutively, using a cheap content fingerprint — no second model needed.
Why
Adopted from oh-my-pi's advisor loop-guard + message-fingerprint (see research notes). A stuck model burning provider budget on identical calls is the cheapest failure mode to detect deterministically. Tole already has MAX_STEPS: 32 as a hard ceiling; this adds a semantic tripwire before that ceiling — catching the loop at call 3 instead of call 32.
Design sketch
In drive() (tole-core/src/turn.rs): hash each tool call as (tool_name, canonical_json(input)) → e.g. u64 via std hasher
Track consecutive identical hashes; threshold e.g. 3
On trip: durable ERROR entry (loop guard) + new TurnOutcome::LoopDetected { tool, count }
Pure function, Tier A testable with MockProvider scripts
Acceptance criteria
Consecutive identical calls (≥3) trip the guard with durable record
Non-identical calls never trip it
Identical calls with interleaved different call resets the streak
Activity
feat(core): E10 loop guard + E11 secret redaction (#25)