- confirmed waste
- savings opportunities
wasteSpendUsd, structuralWasteRate, and CI threshold checks.
The five finding kinds
Retry waste
Classification:wasteConfidence:
high
Xerg treats failed calls that were followed by more work as pure retry overhead. The cost of those failed calls is counted as confirmed waste.
Typical fix:
- add exponential backoff
- reduce retry count
- avoid retrying known non-recoverable failures
Context bloat
Classification:opportunityConfidence:
medium
For workflows with at least three runs, Xerg looks for runs whose input token volume is far above that workflow’s own baseline. This is a directional context-trimming signal, not proven waste.
Typical fix:
- trim prompt scaffolding
- send less repeated context
- split broad tasks into smaller scoped calls
Loop waste
Classification:wasteConfidence:
high
When a run reaches at least seven iterations, Xerg treats spend after iteration five as likely loop waste.
Typical fix:
- add an iteration cap
- add an early exit condition
- tighten workflow guardrails
Downgrade candidates
Classification:opportunityConfidence:
low
Xerg flags expensive models on workflows that look operationally simple, such as heartbeat, triage, summary, tagging, or monitoring style tasks. This is intentionally an A/B test candidate rather than a claim of proven waste.
Typical fix:
- test a cheaper model on the same workflow
- compare quality and cost before changing defaults
Idle waste
Classification:opportunityConfidence:
medium
Xerg looks for workflow names that resemble recurring heartbeat, cron, poll, or monitoring loops. The spend may still be justified, but the cadence and model tier are worth reviewing.
Typical fix:
- reduce cadence
- move to event-driven triggering
- use a cheaper model for routine checks
Confidence levels
| Level | Meaning |
|---|---|
high | Strong waste signal that is usually safe to act on immediately |
medium | Directional signal that should be investigated |
low | Experiment candidate rather than a direct recommendation to roll out |
Why this matters in the product
retry-wasteandloop-wasteroll up into confirmed structural wastecontext-outlier,idle-spend, andcandidate-downgraderoll up into opportunity impact- the first savings test in the terminal report may prioritize an opportunity even when it is not confirmed waste