Skip to main content

Module loop_guard

Module loop_guard 

Source
Expand description

Two loops an agent can be in without anyone noticing, read off the harness’s stream (docs/specs/SPEC_ROUTE_AGENT_BRAKES_2026_11_10.md section 5):

  • the same tool called with the same arguments and failing again and again in one turn (Glim made 49 identical failing Tasks calls), and
  • a thought that repeats itself (“Hmm. Hmm. Hmm.”, #31427).

The guard only looks: it answers Stuck for the frame that crossed a threshold, and the caller ends the turn and tells the agent and its leader. It holds no state across turns.

Structs§

LoopGuard
Per agent: what the current turn has done so far.

Enums§

Stuck
What the agent is stuck doing.

Constants§

FAILING_CALLS
The same failing call this many times in a turn ends the turn.