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
| Tool | What it's good at | Loop-relevant notes |
|---|---|---|
| Langfuse | Open-source (MIT) tracing, sessions, cost per trace and per user, LLM-as-judge evals | Acquired 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 |
| LangSmith | Tracing and evals, especially for LangChain and LangGraph | Repeated calls are visible on inspection; we found no automated loop alerts (LangChain). |
| Braintrust | Evals 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 |
| AgentOps | Session timelines, cost per tool call | Loops show up visually as repeated identical spans (AIMultiple). secondary reporting |
| OpenTelemetry GenAI conventions | A shared vocabulary: invoke_agent, execute_tool, plan spans | Still in "Development" status; moved to its own repository in v1.42.0, June 2026 (Greptime, Dash0). secondary reporting |
| OpenRouter Broadcast | Ships request traces to Langfuse, Datadog and others with no code changes | Asynchronous, 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
- 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.
| Detector | Signal | Why it matters |
|---|---|---|
| Repetition | Identical 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). anecdotal | Thrashing |
| Poll spin | Continuations while the external state they wait on hasn't changed | The 173-continuation CI wait |
| Context re-read tax | Input tokens per iteration rising while output and progress stay flat; falling cache-hit rate | The dominant cost of long loops |
| Diminishing returns | No change in diff, metric, tests or task list for M iterations | The AgentLoop stopping signal |
| Judge overhead | Share of spend going to evaluation rather than work | A strong judge can quietly double the bill |
| Ping-pong | Two agents alternately answering each other with no external change | The 264-hour livelock |
| Idle standing goals | Heartbeats or routines that end in "nothing to do" for weeks | Standing goals go stale |
| Fan-out | Sub-agent calls per iteration trending up | Hidden multiplier on cost |
| Tier mismatch | Deferrable steps billed at standard rates | Money 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
- Agent observability: what the trace can't see (Morph)
- One connected system for agent observability (Braintrust, vendor)
- OpenTelemetry GenAI semantic conventions explained (Dash0)