The cost of failure and repetition

Provantix already finds calls that repeat and runs that fail. This page puts money on them. "This agent made the same call 40 times" is a note. "And the calls around it cost an estimated 310 dollars this week" is something an owner acts on.

It is on the Cost page, on the Waste and savings tab, under "Spend on calls and runs that failed or repeated", and in the detail of the two existing findings.

In the product

Waste and savings with the assumptions behind its analyses

Product capture, 15–16 November 2026. Open the image for full size. Counts and dates are examples from the captured workspace.

Open Cost, then Waste and savings. Suggestions are candidates or estimates with stated assumptions. Calls that failed or repeated are not automatically waste, and overlapping categories must not be added as if they were independent.

What it says, and what it does not

  • Every figure is an estimate from your own price table. Provantix ships no prices. A model call with no price is counted and marked unpriced, never treated as free, so a figure is at least what is shown. A tool call carries no price of its own and is not called unpriced.
  • It never says a cost was wasted. It says what was spent on what and states the assumption each line rests on. A retry that succeeded was needed, and is shown on its own.
  • "The same content" means the same content hash. Provantix does not read prompts or tool arguments. It compares the sha256 the source sent. A call with no hash cannot be shown to have the same content, and the line says so where that matters.
  • A tool call's money is the model call that issued it. A tool call has no price, so an attempt is the call's own cost plus the model call directly before it in the same run, which is taken as the turn that issued it. Each model call is counted once per line. This is an assumption, stated on every line that uses it.
  • The lines overlap. A retry can be inside a failed run. They are shown separately, and "counted once" says what they add up to with each call counted a single time.

A run is a trace, or a session when there is no trace. A call with neither is counted in the failed-calls line and in no run-based line.

The six lines

Line How it is added up What it assumes
Calls that failed The estimated cost of every model call, and the cost recorded on every tool call, whose outcome is failure. A failed model call is often still charged for what it was sent. This is the price-table estimate of those calls, not what the provider billed.
Runs that ended in failure The estimated cost of every call in a run whose last call with a recorded outcome was a failure, once nothing was recorded for 30 minutes. What was done before the failure did not reach its goal. A run that failed late may have finished part of its work, and the records cannot say. Whether a run was abandoned is not recorded, so only failure counts.
Retries A call that repeats the call just before it in the same run (same tool, target and content hash) after that one failed: its own cost plus the model call that issued it. Retries that succeeded are shown apart. A retry that succeeded was needed. Only the retries that failed again assume the repeat was not needed.
Calls repeated in a row The calls beyond the first in each stretch of five or more identical consecutive calls (the rule of the repeated-call finding): their own cost. The repeats beyond the first were not needed. A poll, a pagination that does not change the target and a retry policy look the same in the records. An agent whose declared schedule explains the pace is left out, as in the finding.
Loops One run calling the same tool, or the same model, with the same content hash more than 5 times: the calls beyond the 5th, each with its own cost plus the model call that issued it. Calls beyond the 5th with identical content did not add anything. Only calls with a content hash can be checked.
Runs cut off by a limit The estimated cost of every call in a run whose last model call stopped on a token limit (length, max_tokens, max_output_tokens, max_completion_tokens, model_context_window_exceeded). The work was not finished when the limit was reached. Only model calls whose source states why they stopped can be seen. No source Provantix reads records a step limit.

For each line the page shows the cost in the period, its share of all spend, the change against the period of the same length before, the split by department and by agent (each with its share of that department's or agent's own spend), and the runs behind it, biggest first. Each run opens as the same run page as everywhere else.

Why a repeated call can carry no cost: the repeated-call rule ends a stretch when anything else happens in between, so the calls in it are usually tool calls with no price of their own. The line says so when it is zero. The money around repeated calls with a content hash is in the loops and retries lines.

In the existing findings

The repeated-call finding and the failing-in-a-row finding now say what their calls cost, labelled an estimate on your price table, and how many have no price. When the estimate reaches 100 dollars the finding's severity is one step higher, and the finding says that is why. Below that the severity is what it was.

What you need

The content hash and the stop reason come from the source. The hosted intake keeps the sha256 of tool arguments and prompts (never the text) and the model's finish reason where the source sends them (gen_ai.response.finish_reasons). A source that sends neither still shows failed calls, failed runs and repeated calls in a row, but retries and loops cannot be checked for the same content and the page says how many calls carried a hash. A record erased for privacy has no hash.

API

GET /api/avoidable-cost?from=&to= returns the six lines. Add line= for one line with every run behind it, agent= or department= to filter. A period is at most 92 days. Members can read it: it shows departments and agents, never a person.

Limits

  • It reads every call of the period. For a very large period the response says it is partial; choose a shorter one.
  • Estimates follow your price table. If the table is wrong or a model has no price, so are the figures.
  • Nothing here shows why a call failed or repeated.