TRANSMISSION // 2609.28585v2
How Tool Results Can Inflate AI Processing Costs
Source published
A study finds that retained tool results can be processed again in later model calls, increasing measured token use and nominal cost exposure. It tests host-side checks before reingestion.

AI agents often carry tool results into later calls to keep a task on track. That continuity can also mean the provider processes the same content again. Researchers test how attacker-controlled results can amplify this provider-metered processing, and whether controls in the host software can intervene before the content is sent back to the model.
When useful history creates repeated work
A tool-using AI agent may search a document service, receive a result, and use it to request another page. To continue, the agent’s runtime may include earlier results in later model inputs. Providers meter that processing; if the same content remains in the history, it can contribute to usage again.
The authors call externally supplied content that persists into later billed inputs persistent billable state. They ask whether someone who can influence the response from an already configured tool can exploit this process, and whether host software can limit the resulting exposure without simply deleting useful history.
The paper describes this as a denial-of-wallet risk: an attacker seeks to increase processing charged to the victim or exhaust an authorized spending limit. The study measures provider-reported token usage and estimates nominal exposure using listed prices. It does not measure invoices issued or charges actually paid. Its main threat model assumes an adversary can control results from a remote service the operator has already configured, but cannot use the victim’s provider credentials or run code on the victim’s machine. The researchers do not measure how common this access is in real deployments.
Testing attacks and history policies
The researchers built DoW-Bench and evaluated six attack vectors across six model families. The balanced analysis across all six families covered four vectors; two additional, capability-dependent vectors were included in other analyses. The vectors were distinct strategies, including padding returns to encourage another call, varying payload representation, escalating size later, chaining calls among controlled tools, or inducing longer model output. They were not all tested across every family.
Across 243 executions, the maximum per-session cumulative input reached approximately 14,293 times that session’s complete first-call input (reported in detailed results as 14,293.4×). This is the highest measured result in the study, not a typical outcome or a prediction for every agent. In a separate priced subset of 69 attack sessions, 51 crossed the study’s $0.10 threshold—that is, their estimated exposure was greater than $0.10. The maximum listed-price exposure was $3.404. These estimates apply provider-reported token counts to selected listed rates, not actual bills, and costs can differ across providers and deployments.
To examine history’s contribution, the researchers independently reran tasks under three policies: retain raw history, drop earlier untrusted returns, or replace them with deterministic summaries. On persistent-return tasks, retaining raw history raised mean effective session cost by 21.2–35.9% compared with Drop or Compress, depending on provider and comparison. These results concern that task class; they do not mean the same cost difference applies to every workflow.
A separate set of matched-necessary tasks required information from earlier turns. Compression completed 10 of 12 tasks for one provider and 11 of 12 for the other, while deletion completed 2 of 12 for each. These small task sets suggest compression can preserve useful continuity in the tested cases; they do not show it will do so universally.
Checks before the next model call
The proposed defense acts at the host’s decision point before retained content is sent to the model again. Four checks bound prompt size, flag rapid context growth, constrain repeated tool opportunities, and stop later calls when cumulative nominal cost crosses a threshold. In replay tests, the combined controls stopped all 41 retained multi-turn attack traces under each of three presets. Separate integrations placed checks before subsequent provider calls. On one Mistral/MCP test path, the system blocked 10 of 10 attack-shaped sessions and completed 20 of 20 four-step benign tasks. These results apply to the tested traces, settings, and integrations; they are not a general guarantee against future attacks.
The authors also examined public MCP server and transport repositories. They randomly selected 100 repositories for full-code review; 95 were still public at audit time. Of those 95, 17 contained a verified, code-visible safeguard. One bounded cost, and none combined all four safeguard families: prompt-mass limits, growth monitoring, recursion limits, and cost controls. The audit covers source code at the examined commits; it does not establish whether deployed systems had additional protections in configuration or elsewhere.
What the findings establish—and what they do not
The study separates two decisions: whether a tool may be invoked, and whether its return should enter another provider-metered model input. The authors argue that the host owns this pre-reingestion control point because it handles retained state and decides whether to issue another call. They also report that the MCP Python SDK maintainers, after disclosure, said limiting how tool results are fed back into model context is the host application’s responsibility. This is the authors’ architectural argument, not a comparative demonstration that every host is best placed in every deployment.
The experiments do not establish real-world attack frequency or show that every retained result creates runaway costs. They cover selected models, tasks, configurations, and attack patterns, while provider usage and prices vary. One reported comparison of fixed and progress-authorized spending schedules also cannot isolate an independent benefit from progress gating: the schedules had different spending limits, and order and cache behavior differed.
This work is an arXiv preprint, not evidence of consensus. Its central finding is about a specific system boundary: retained tool output may contribute to future provider-metered processing, and the tested host-side checks can intervene before reingestion under the study’s conditions.
- AI agents
- denial-of-wallet
- tool calling
- LLM security
- persistent state
- MCP
- token usage
Reviewed cross-references
These connections were reviewed by a model, not independently fact-checked by a human. Similarity does not imply agreement; consult the original papers and the evidence below.
When Helpful Error Hints Lead AI Agents Around a Denial
Supporting evidence: Both studies identify host-side intervention as a way to limit risks that unfold after a tool interaction: Zhang et al. test controls before retained results are reingested, while Lian et al. test stripping recovery hints from denials and remembering denied effects. Their results concern different threats and experimental setups, so they support this bounded architectural point rather than validating each other’s defenses.
Model review: · openai-codex/gpt-6-luna
Evidence and provenance
Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.
2609.28585v2 — Original paper
Excerpt reference:
static/papers/2609.28585v2.md:13-66
Basis: Paper text
Source file SHA-256:94daf252bab84daada9f399bb7c5147ddb0fdf4b0e8640e0f7023049c7b025802611.37500v1 — Original paper
Excerpt reference:
static/papers/2611.37500v1.md:13-119
Basis: Paper text
Source file SHA-256:258842e93092501485ba48c39ebf510a3d71e5d2c2cc519c20cc59198df364dc
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.
Testing Whether AI Agents Learn Across Tasks
Source published
Shared keywords: ai agents, persistent state
A Large Preference Dataset for Teaching AI to Call Tools
Source published
Shared keywords: ai agents, tool calling
How to catch an AI agent’s brief security breach
Source published
Shared keywords: ai agents, tool calling
Forethought gives AI tool use a checklist—and checks the steps
Source published
Shared keywords: ai agents, tool calling
What Makes AI Agents More Reliable in Grid Maintenance?
Source published
Shared keywords: ai agents