Skip to Content
loop.fun
Remedies

Loop-native reporting

Tracing tools organize data by trace and session. Loops need it by goal and iteration, with inefficiency detection and a triage queue for "done" goals.

The problem

When an overnight loop finishes, an operator wants answers to questions like these:

  • What did this goal cost, in total, across every run and retry?
  • Was it actually achieved, or did the agent only say so?
  • Which iterations moved it forward, and which were wasted?
  • Which of my standing goals haven't done anything useful in a month?
  • Of the twelve goals that reported "done" last night, which three should I look at first?

Today's observability tools can show the raw material, but none of them answer these directly, because their unit of analysis is the trace or the session, not the goal. And most loops aren't instrumented at all: the adoption study found loop state living outside version control and claims of benefit resting "almost entirely on anecdotes". primary source

What already exists

ToolWhat it's good atLoop-relevant notes
LangfuseOpen-source (MIT) tracing, sessions, cost per trace and per user, LLM-as-judge evalsAcquired by ClickHouse in January 2026; core stays MIT (ClickHouse). Agent graphs, which draw a trace as nodes and edges, went generally available in late 2025 (Langfuse). primary source
LangSmithTracing and evals, especially for LangChain and LangGraphRepeated calls are visible on inspection; we found no automated loop alerts (LangChain).
BraintrustEvals plus production trace analysis"Patterns" run continuously over traces and can surface recurring failures such as repeated tool calls that make no progress (Braintrust). The closest thing to built-in inefficiency detection. primary source
AgentOpsSession timelines, cost per tool callLoops show up visually as repeated identical spans (AIMultiple). secondary reporting
OpenTelemetry GenAI conventionsA shared vocabulary: invoke_agent, execute_tool, plan spansStill in "Development" status; moved to its own repository in v1.42.0, June 2026 (Greptime, Dash0). secondary reporting
OpenRouter BroadcastShips request traces to Langfuse, Datadog and others with no code changesAsynchronous, so no added latency; a free trace field carries your own metadata (docs). Useful for getting goal ids into an existing tool. primary source

The gap isn't tracing. It's that none of these tools model the loop's lifecycle: goals that persist for weeks, runs that start and stop, iterations that should make progress, and outcomes that need verifying.

A loop-shaped data model

GoalRunIterationStep
Each step is a model call, a tool call or a judge verdict. Every level rolls up cost, time and progress to the one above.
Goal
Persistent objective with a completion condition, a budget and an owner. May be standing.
Run
One attempt, ending as achieved, budget-limited, abandoned or interrupted.
Iteration
One pass of the loop, with a progress signal: did the diff, metric, test count or task list change?
Step
Model call, tool call or judge verdict, as OTel GenAI spans.
Outcome
What happened in the end, and how sure we are. See achievement triage below.

The ids can come from the control plane if one is in place, from OpenRouter Broadcast's trace metadata, or from the harness's own session logs.

Inefficiency detection

These are the patterns this guide keeps running into. Each one can be computed from a goal-tagged event log, without a model.

DetectorSignalWhy it matters
RepetitionIdentical tool + normalized arguments, divided by total tool calls. One guide suggests investigating above 0.3 and treating 0.5 as a near-certain loop (OptScale). anecdotalThrashing
Poll spinContinuations while the external state they wait on hasn't changedThe 173-continuation CI wait
Context re-read taxInput tokens per iteration rising while output and progress stay flat; falling cache-hit rateThe dominant cost of long loops
Diminishing returnsNo change in diff, metric, tests or task list for M iterationsThe AgentLoop stopping signal
Judge overheadShare of spend going to evaluation rather than workA strong judge can quietly double the bill
Ping-pongTwo agents alternately answering each other with no external changeThe 264-hour livelock
Idle standing goalsHeartbeats or routines that end in "nothing to do" for weeksStanding goals go stale
Fan-outSub-agent calls per iteration trending upHidden multiplier on cost
Tier mismatchDeferrable steps billed at standard ratesMoney left on the table; see off-peak tokens

Each detector should come with a dollar figure ("this goal spent $31 in iterations that changed nothing"), because that's what makes people act on it.

Achievement triage

The part we think is most underserved. Every finished run gets an outcome class, and the operator gets a review queue sorted by what most needs a human.

Verified
An independent check passed: tests re-run, service queried, screenshot compared. Not the agent's word.
Claimed
The agent or its judge said "done", but nothing independent confirms it.
Partial
Some acceptance criteria met, others not.
Budget-limited
Stopped by a cap with work remaining.
Stuck
Stopped by a breaker, or flagged by a detector above.
Regressed
Was verified, then later invalidated (reverted, failing again).

The queue ranks runs by roughly blast radius × uncertainty: a "claimed" outcome that touched production, money or customers goes to the top; a "verified" docs fix goes to the bottom. Each entry comes with its evidence pack: diffs, test runs, the judge's reasoning, and what the loop tried and abandoned. This is the review built for loop output idea made concrete, aimed at the human bottleneck.

Two headline metrics fall out of this:

  • Cost per verified achievement. Tokens and dollars divided by goals that passed an independent check. The metric Cost argues for.
  • False-done rate. The share of "claimed" outcomes that later fail verification. The most direct measure of the verification problem we know of.

The low-hanging version

Read what already exists. A CLI that reads harness session logs (Claude Code and Codex, for example, keep local session transcripts) and produces a per-goal report with the detectors above. No SDK, no hosting.

Ingest standard traces. Accept OTel GenAI spans and OpenRouter Broadcast, so teams already on Langfuse or Datadog can add the loop view without re-instrumenting.

Add the triage queue. Outcome classes, ranking and evidence packs, delivered where reviewers already are: a pull-request comment or a daily digest.

Build on, not against. Langfuse is MIT-licensed and runs on ClickHouse; a loop layer could plausibly be a set of views and detectors on top of it rather than a competitor. The moat, if there is one, is the opinionated loop taxonomy and the detectors, not the trace storage.

Open questions

  • Who decides "verified"? The whole scheme depends on independent checks existing. Where they don't, the honest class is "claimed", and that may be most goals.
  • Privacy. Loop traces contain customer data, credentials in tool arguments and internal code. Self-hosting has to be a first-class option.
  • Will the incumbents add goals? Probably, eventually. Braintrust's patterns are already close on detection. The question is whether a loop-first tool can get there sooner and stay more opinionated.

Further reading

loop.fun

Patterns, hints and tools for designing the loops that keep agents working, and for widening the set of loops you can think of.

© 2026 loop.fun · CC BY 4.0

On this page