detect_loop
MID-RUN loop check (fast, no LLM, free). Send your recent steps DURING a run; get back whether you're stuck repeating a tool call and a concrete next move. Call this every few steps to catch a loop BEFORE you burn your step budget — don't wait for a postmortem. Non-blocking advice, not a verdict.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps | Yes | your recent steps (last ~5-10), each with an action/tool and optionally inputs — same step shape as diagnose_trace | |
| threshold | No | how many identical consecutive calls = a loop (default 3) |