Failure modes
Runs that failed the same way, grouped into one tracked entity. Fixing the mode fixes the runs that follow.
These modes burned $1.058 over the last 7 days.
- Repeated identical callTop priority
Called the same tool with the same arguments
Tool and arguments are identical to the earlier call, and nothing wrote to that target in between. Same input, so the result had no reason to differ.
5
Affected runs
$0.252
Wasted cost
Last 7 days
- Tool-call cycle
Repeated the same combination of tools
The call sequence contains a repeating subsequence. State stopped advancing across it.
5
Affected runs
$0.241
Wasted cost
Last 7 days
- No pivot after empty result
Got an empty result and kept the same arguments
The result was empty, and the call that followed used the same tool with the same arguments.
4
Affected runs
$0.184
Wasted cost
Last 7 days
- Prefix cache broken
Paid for the same context twice
The previous call read most of its context from cache; this one did not, and wrote a large new cache entry instead — the prefix changed.
2
Affected runs
$0.152
Wasted cost
Last 7 days
- Unsourced number
A number in the output is in no tool output
Every numeric literal in the output was string-matched against all tool output and user input in this run. This one matched nothing.
3
Affected runs
$0.149
Wasted cost
Last 7 days
- Context evicted
An earlier message dropped out of the context
A message id that was in the previous call is missing from the message list sent this time.
2
Affected runs
$0.080
Wasted cost
Last 7 days
Rules for your agent
Each rule below was derived by counting, not by asking a model. Paste the ones you agree with into the project's AGENTS.md (or CLAUDE.md) so the next run starts knowing them — the evidence line under each rule is there so you can drop the ones that describe intended behaviour.
9 rules · 91.4K spent on work that produced nothing
Before calling a tool, check whether the previous call had the same arguments. If it did, the result has not changed — reuse it instead of calling again.
repeated-call — 5 runs, 31,691 tokens avoidable, $0.25 spent on the affected steps. Rule: hash(tool, args) == previous call
If you notice the same two or three calls alternating, stop and state what you are missing. A cycle means the plan is wrong, not that the next call will differ.
call-cycle — 5 runs, 23,068 tokens avoidable, $0.24 spent on the affected steps. Rule: repeating subsequence of length ≥ 2 in the call sequence
When a search returns nothing, change the query before retrying. Repeating an identical query against an unchanged source returns nothing again.
empty-result-loop — 4 runs, 19,741 tokens avoidable, $0.18 spent on the affected steps. Rule: 0 results, then no change in args
Keep the stable part of the prompt — system text, tool definitions, file contents already read — in the same order across calls. Reordering it discards the prefix cache and the whole prefix is billed again.
cache-break — 2 runs, 10,151 tokens avoidable, $0.15 spent on the affected steps. Rule: cache_read collapses while cache_write spikes
Restate the constraints from the original request before a long tool sequence. Instructions given early are the first thing lost when context is trimmed.
context-eviction — 2 runs, 6,700 tokens avoidable, $0.08 spent on the affected steps. Rule: message id present in call N, absent in call N+1
Every figure in the answer must come from a tool result or the user's own words. If you cannot point at where a number came from, say you do not have it.
unsourced-number — 3 runs, $0.15 spent on the affected steps; this one costs correctness, not tokens. Rule: numeric literal in output ∉ (tool output ∪ user input)
`gateway.ts` has been run by hand in 3 separate sessions. Wrap it in a script or skill and call that instead of rebuilding the steps each time.
25 occurrences across 3 sessions, 118,340 tokens. Example: Edit(file_path="src/server/gateway.ts", old="legacyFetch", new="httpClient")
`checkout.ts` has been run by hand in 3 separate sessions. Wrap it in a script or skill and call that instead of rebuilding the steps each time.
22 occurrences across 3 sessions, 104,374 tokens. Example: Read(file_path="src/routes/checkout.ts")
`pnpm server test` has been run by hand in 3 separate sessions. Wrap it in a script or skill and call that instead of rebuilding the steps each time.
8 occurrences across 3 sessions, 32,507 tokens. Example: Bash(command="pnpm --filter server test")