AIToday
Large Language ModelsHacker NewsPublished: Jun 22, 2026, 13:00 JST1 min read

A developer released state-harness, a tool that detects when AI agents spiral out of control by monitoring token consumption, without requiring extra AI calls to diagnose what went wrong.

A developer released state-harness, a tool that detects when AI agents spiral out of control by monitoring token consumption, without requiring extra AI calls to diagnose what went wrong.

3 Key Points

  1. What happened

    State-harness is a Python library that monitors multi-turn AI agent loops by tracking token usage against a baseline. When token growth exceeds a threshold (e.g., 2× baseline) for consecutive steps, it trips and classifies the failure pattern—context spiral, retry storm, policy drift, early explosion, or budget exhaustion—with actionable fix suggestions, all inferred from the energy trajectory alone without calling an LLM.

  2. Why it matters

    Production multi-agent systems fail at rates of 41–87% (Kore.ai 2026), and when they spiral, a budget cap kills the task but reveals nothing about why. State-harness provides failure diagnostics and early termination; in benchmark tests across 3,175 runs, it reduced search nodes by 38.6% and wall time by 30% on SWE-bench by stopping dead-end branches early, achieving these gains with zero false positives across seven models.

  3. What to watch

    The tool is available now via `pip install state-harness` with pre-built wheels for Linux, macOS, and Windows (x86_64 + ARM64), requiring Python ≥ 3.10 and no Rust toolchain. It integrates with LangGraph, CrewAI, and vanilla Python, and is most useful for search-tree agents (MCTS, beam search) and platform teams; it is not needed for chatbots, RAG, or ReAct loops with fewer than 10 turns.

Ask the AI about this article →

Get the latest Large Language Models news every morning

For example, today's edition would include:

  • Visko raises $10M, launches live AI video model OrbisSiliconANGLE AI · 1h ago
  • Runway unveils Solaris, an AI that generates app interfaces in real timeTHE DECODER · 1h ago
  • Google AI Search flags Facebook users as dangerTHE DECODER · 1h ago

AI-summarized, only the topics you pick — one digest a day via Email, Slack, or Discord.

Free · takes 30 seconds · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. Q&As are published on this page for other readers too.

Related Articles

Next articleAI Power Demand to Surge 165% by 2030, Straining Grids