jevrecipes

Recipe catalog / progress-stall

Detect a stalled agent

progress-stall is a Jev recipe from the jev-recipes TypeScript package. Does transcript, the recent agent steps, show the agent failing to make progress toward objective by repeating actions, circling, or reprocessing the same information? Use it when you need a yes/no check on a running agent every few steps so a supervisor can interrupt a loop before it burns the remaining budget.

Last updated .

Explore this recipe interactively · Source and implementation guide · Markdown version

How do I use progress-stall in TypeScript?

Install with npm install jev-recipes. Requires Node.js 22.9 or newer and ES modules. Set TYPESAFE_API_KEY in your server environment for live calls, which send input to TypeSafe and use API quota. See the installation guide.

import { progressStall } from 'jev-recipes/progress-stall';

const result = await progressStall({
  "transcript": "Step 14: ran `npm test` -> 3 failures in date-utils.test.ts (timezone offset). Step 15: opened src/date-utils.ts, read formatDate. Step 16: ran `npm test` -> same 3 failures. Step 17: opened src/date-utils.ts, read formatDate again. Step 18: ran `npm test` -> same 3 failures. Step 19: opened src/date-utils.ts, read formatDate. Step 20: ran `npm test` -> same 3 failures.",
  "objective": "Make the date-utils test suite pass without changing the expected values in the tests.",
  "minConfidence": 0.8
});
console.log(result);

What input does progress-stall take?

FieldTypeNeeded
transcriptstringRequired
objectivestringRequired
minConfidencenumberOptional
Full input and result schemas
{
  "input": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "transcript": {
        "type": "string"
      },
      "objective": {
        "type": "string"
      },
      "minConfidence": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      }
    },
    "required": [
      "transcript",
      "objective"
    ]
  },
  "result": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "model": {
        "type": "string"
      },
      "usage": {
        "type": "object",
        "properties": {
          "input_tokens": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "output_tokens": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "input_tokens",
          "output_tokens"
        ],
        "additionalProperties": false
      },
      "status": {
        "type": "string",
        "enum": [
          "ready",
          "review"
        ]
      },
      "probability": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      },
      "confidence": {
        "type": "number",
        "minimum": 0,
        "maximum": 1
      },
      "verdict": {
        "type": "string",
        "enum": [
          "stalled",
          "progressing"
        ]
      }
    },
    "required": [
      "model",
      "usage",
      "status",
      "probability",
      "confidence",
      "verdict"
    ],
    "additionalProperties": false
  }
}

What does a progress-stall result look like?

This hand-authored response demonstrates the contract. It is not a model accuracy measurement. Run it without an API key: npx jev-recipes demo progress-stall.

{
  "model": "demo-fixture",
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0
  },
  "status": "ready",
  "probability": 0.94,
  "confidence": 0.94,
  "verdict": "stalled"
}

Input

See shared options and behavior for client configuration, validation, and errors. Types are inferred from this folder's Zod 4 schemas.

Result

verdict is stalled when Jev's yes probability is at least 0.5 and progressing otherwise. probability is that yes probability. confidence is the probability of the chosen side, so a 0.1 yes probability yields progressing with 0.9 confidence.

A result is ready when confidence meets minConfidence. Otherwise it is review. Treat a review result as unknown and fall back to your safe default, such as letting the agent run a few more steps before checking again or asking the user whether to continue.

Reuse and calls

Uses the shared gate helper, a single yes/no question. This folder owns the question wording, the outcome descriptions, and the review policy. A live invocation makes one logical Jev request.

Limits

The recipe sees only the steps in transcript. A loop longer than the window looks like progress, and slow but real progress can look like a stall if the window is too short, so choose the window to match the agent's typical step cost. It reports that the agent is stalled, not why or what to do next; interrupting, redirecting, or escalating belongs in application policy. To test whether one new action retries a specific earlier one use repeated-attempt; to grade a single step's contribution use step-progress.

Example input

demo.json contains editable input and a hand-authored response. After installing jev-recipes, npx jev-recipes demo progress-stall shows an offline illustration, not an accuracy measurement. Use npx jev-recipes describe progress-stall to inspect the input and result schemas.

How accurate is progress-stall?

Current mixed-source measurement

jev-1.13.0 / 2026-10-04 / 102 development cases

Scoring revision 2.

100%All-case accuracy
0Sent for review
0Failed calls / cases

102 ready decisions, with 100% accuracy among those decisions.

95% case-level interval: 96% to 100%. Related synthetic cases are correlated.

This measures the recorded dataset, not general readiness. Label sources: unspecified: Existing repository labels; independent review and original authorship were not recorded.; author-synthetic: AI-authored synthetic boundary cases for jev-recipes; labels have not had independent human review.

Use the evaluation guide to measure this decision on your own labeled cases.

What are the limits of progress-stall?