J.
12 / 100

Stop the loop

same permission denied response

What should the agent do next?

Stop and report83%
Retry12%
Switch tool5%
// Conceptual pseudocode — not Jev SDK syntax
const state = {
  "attempts": 6,
  "last_errors": "same permission denied response",
  "changed_input": false
};

const decision = await evaluateDecision({
  state,
  question: "What should the agent do next?",
  options: ["Stop and report","Retry","Switch tool"],
});

// Your adapter normalizes the provider response.
// Tune this example threshold on labelled data.
if (decision.outcome === "Stop and report"
    && decision.probability >= 0.85) {
  stopAgentLoop(decision);
} else {
  queueForReview(decision);
}

Stop the flow and stop and report.