← All toolsLive tool · your own data

Agent Loop Detector

Paste your agent's run and Jev grades each step — progress, repeating, stuck or escalate — then flags the moment it's looping and lets you copy the flagged steps. The supervisor for your agent loop, live. No key, just press analyze.

Paste an agent's run — one step per line. (Sample loaded — edit or paste your own trace.)
Each step is one Jev decision — real progress, a repeated action, spinning in place, or something only a human can unblock — so a supervisor can stop a runaway loop.
0/12steps
0.0selapsed
0/sdecisions/sec
Jev cost
1

Read the failing test output: 3 of 20 tests fail in auth.test.js with 'token undefined'.

2

Opened auth.js and found getToken() returns undefined when the header is missing.

3

Added a null check in getToken(); re-ran tests — now 2 fail.

4

Edited getToken() again with the same null check; re-ran tests — still 2 fail.

5

Edited getToken() a third time with essentially the same change; still 2 fail.

6

Re-ran the exact same test command a fourth time; identical failure, no new information.

7

Tried to read the CI secret JWT_SIGNING_KEY to reproduce locally, but it is not accessible.

8

Searched the repo for JWT_SIGNING_KEY; only referenced in the deploy config I can't open.

9

Discovered the token is signed by an external auth service; found its docs and the expected header format.

10

Updated the test setup to inject a valid signed token per the docs; re-ran — now 1 fails.

11

Same assertion has failed 5 times with no change in approach or output.

12

Blocked: fixing the last test needs a staging credential only the platform team can grant.

Wrap your agent loop in a Jev health check and auto-halt on STUCK / ESCALATE. Get an API key →

Paste your own agent's steps to catch loops before they burn tokens. Your text is sent to Jev only to grade each step and is not stored.

Get an API key →Ready-made APIs
Build this with Jev

The same demo is one Jev call

  1. Take each step of the agent's run
  2. Ask Jev: progress / repeating / stuck / escalate
  3. Grade the trace in parallel (or after each live step)
  4. Auto-halt on STUCK, hand off on ESCALATE
one call per step · parallel · stops runaway loops
const results = await Promise.all(items.map((item) =>  // items = agent steps
  fetch("https://jevtypesafeai.com/api/v1/decide", {
    method: "POST",
    headers: { Authorization: `Bearer ${process.env.JEV_API_KEY}` },
    body: JSON.stringify({
      state: item,
      questions: {
        state: { type: "choice", instructions: "Grade this agent step.",
               criteria: { progress:"new ground", repeating:"same action again",
                           stuck:"spinning", escalate:"needs a human" } },
      },
    }),
  }).then((r) => r.json())
));
if (results[i].answers.state.choice !== "progress") supervisor.flag(step);
See a real decision REPEATING · 212ms
State
One step from an autonomous agent's run:
“Edited getToken() a third time with the same change; still 2 tests fail.”
Question choice · state
repeating86%
stuck11%
progress3%
latency 212mscost $0.000013

How it works

Autonomous agents fail quietly: they keep taking actions, but the actions stop making progress — the same edit re-applied, the same command re-run, the same error re-read. Here every step of the trace is one Jev call that returns a typed state — progress, repeating, stuck, or escalate — plus a calibrated confidence, streamed in parallel. A short run of non-progress steps trips a 'loop detected — intervene' verdict.

It's the health check you'd run over an agent's live trace, made visible: watch each step get graded and the stall build up before it burns your token budget.

Build it into your agent loop

With a hosted key the same Jev call becomes a supervisor: after each step, one typed decision at $0.42/M input tokens tells you whether the agent is advancing or spinning. Auto-halt on STUCK, hand off to a human on ESCALATE, and break out of a REPEATING streak — instead of letting a runaway loop rack up cost. A clean enum you switch on, no parsing, no guessing.

FAQ

Does Jev really judge each step?

Yes — every step is an independent Jev call returning a typed state (progress, repeating, stuck, escalate) with the confidence behind it. The run is graded in parallel and the verdict is computed from the pattern of states.

How does it decide the agent is looping?

It flags a loop when any step is graded stuck or escalate, or when there's a sustained run of consecutive non-progress steps. You can tune that threshold to your own tolerance when you wire it in.

Is it free? Can I check my own agent?

Free, no key — a rate-limited call to the live Jev API on a sample trace. To supervise your own agent, run the same call after each step with a hosted key and halt or escalate on the state it returns.

More: Jev Skill Router · Context Compaction demo · All Jev tools · Jev API docs

Agent Loop Detector — catch an AI agent that's stuck in a loop · Jev by TypeSafe AI