Component · for humans & their agents
Agent Loop Burn
verified · first-partyactively maintained$0 during beta (was $69)
Where the session went, when it went nowhere. Finds the tokens an agent spent producing nothing, and checks a call for redundancy before you pay for it.
by Code Recycle
20 tests · 5/5 deliberate defects caught. Zero runtime dependencies.
This is the quota problem, one level down
The complaints are loud and mostly aimed at vendors:
> "> 70% of tokens wasted" > "called every fucking tool, started up 4 mcps" > "two prompts torched my entire 5h session" > "Freezes on 'Asking Questions' During Long Runs"
Some of that is pricing, and pricing is not something a library fixes. But a large share of a burned session is work the agent did that produced nothing — and that half lives entirely inside your own loop, where you can see it:
- the same file read six times, unchanged between reads
- the same search re-run with identical arguments
- an edit, its reversal, then the same edit again
- a run of turns that asked questions and touched nothing
Each consumes context going in and output coming out, and each is detectable from a trace you already have.
analyseBurn(trace);
// { totalTokens: 45_300, wastedTokens: 30_000, wasteRatio: 0.662,
// topRecommendation: "cache observations within a session: big.ts cost 30000 tokens to re-learn" }The subtlety that makes it a product and not a GROUP BY
A repeat is only waste if nothing changed in between. Re-reading a file you just edited is correct and necessary. So mutations are tracked between observations, and a re-read that follows a write to the same target is never counted.
Get that wrong in the obvious direction and the tool reports careful agents as wasteful — which is how it ends up switched off.
This is where a test found a real bug in the shipping code, not a missing test. The duplicate-call pass originally grouped by (name, args) across the whole trace and only skipped targets already flagged as redundant observations. So read → write → read was reported as a duplicate: the two reads share arguments, and the write never put the target into the redundant set. It only surfaced with a write producing identical content — exactly what agent-edit-scope exists to detect, so not a hypothetical shape at all. The grouping key now carries a per-target epoch that advances on every mutation.
The first occurrence is never waste
Reading a file once is the job. Counting every member of a duplicate group inflates the ratio and makes the report useless as evidence — and a waste ratio above 1.0 discredits everything else on the page. A test asserts wastedTokens <= totalTokens.
What it finds
| kind | meaning | |---|---| | redundant_observation | same target observed again, nothing changed it, same result | | duplicate_call | identical name + args, within the same mutation epoch | | oscillation | a target changed back and forth — the agent undoing its own work | | question_loop | consecutive turns that asked and did nothing |
Check before you spend
wouldRepeat({ kind: "observe", name: "read", target: "a.ts", args }, trace);
// { repeat: true, ofStep: 4, detail: "identical to step 4, and nothing has changed a.ts since" }A session that consults this on every call cannot produce the redundant-observation findings at all. That is the cheaper half of the problem and the one worth wiring in first.
What it cannot see
Semantic redundancy. Two greps with different patterns returning the same lines look like two different pieces of work here, and one of them was wasted. This finds the mechanical repeats — the majority, not the whole. A tool claiming to find semantic waste would be guessing, and guessing wrong here means telling an agent not to do work it needed to do.
| not included | why | |---|---| | Capturing traces | you supply the trace; every harness has one | | Billing / rates | true-token-ledger | | Ordering requests for cache hits | prompt-cache-aware-batcher | | Stopping a run | iteration-stop-conditions, spend-ceiling-limiter |
01Capabilities
Does
- + Agent status & health monitoring
- + LLM cost accounting
- + Context budgeting
Doesn’t
- No exclusions declared
02Requirements & stack
Depends on
No declared dependencies
Credentials needed
None declared
Stack
03Community
No endorsements yetNo verified confirmations yet — be the first.
Confirmations come from verified purchasers, installers, vetted reviewers, or an installation outcome your org reported through the agent tools. They grade quality — security is verified separately, and community votes can never override the security gate.
Sign in to confirm — weight comes from verified usage, not vote count.
Issues 0
Open an issueNobody has reported anything yet — a success counts as a report too.
04Trust Passport
Full passport →0/0 automated components pass. An automated score is never a security guarantee.
- publisher identity Publisher status verified; 1 verification(s) on file
- malicious pattern scan No known malicious-behavior patterns across 7 source file(s) plus listing text
- capability contract All 0 observed capability reference(s) match the declared manifest
- agent safety scan No injection patterns in agent-readable content
- provenance No release signature or provenance attestation
- behavioral sandbox Not performed in this environment — requires the production isolated runner (docs/sandbox-requirements.md). No untrusted code is ever executed on the application host.
Every listing must pass this review before it can be sold, and it is re-run on every release. Verification describes what we checked — it is not a guarantee that the software is safe.
05Versions
Full history →| Version | Channel | Released | Notes |
|---|---|---|---|
| 0.1.0 | stable | Aug 12, 2026 | Initial extraction. |