Skip to content

Repair Economics for Tool-Calling LLM Agents: the Gain, the Side Effects and the Cost of Failure Recovery

Oct 2026 · Zenodo (CERN European Organization for Nuclear Research)

Abstract

Agents built on large language models (LLMs) do their work by calling tools, and tools fail. The default engineering answer — “wrap it in a retry” — is never costed. We study repair economics: what a failure-recovery strategy buys in task success, what it costs in API calls, and what it leaves behind in duplicate or unplanned side effects. We build a controlled testbed in which faults are injected deterministically on the server, repair policies act in a framework layer the agent cannot see, and grading reads only the server-side state, never the agent's own account. Four task families and seven fault types (acknowledgement loss, rate limiting, transient server error, schema drift, silently truncated payloads, permission denial and credential expiry) give 20 applicable task–fault cells, which we run against six policies at $0 per run because no model is involved: none, retry, validate, tx, idem, and an oracle that looks up the minimally sufficient action per error code. A second study puts an LLM agent under exactly the same faults with the policy layer switched off. Four results stand out. (i) Idempotency, not complexity, is the dividing line: idem attains the highest success rate (48/60) with zero duplicate side effects and 28% fewer calls than the heavier transactional policy (306 vs. 426). (ii) Counter-intuitively, adding response validation produces more duplicated writes than plain retry (9 vs. 6 over 60 cells): when a write has in fact landed but its response looks wrong, a validating client declares failure and sends it again. (iii) On a permanent error, diligence is pure waste: no policy succeeds under permission denial, yet retry and validate burn twice the calls of policies that stop at the first 403. (iv) Credential expiry is not a retry problem but a refresh problem — only policies that re-acquire a token recover. Left to its own devices the agent recovers well — 98 of 124 episodes, against 10% for a policy-less framework and 60% for blind retry on the same cells — but it never once used an idempotency key, in any condition, including the two that name the flag in the instructions; and the condition with an explicit per-fault recipe left more duplicate writes (6) than the condition with no warning at all (3), because the recipe says “read first, then re-send under the same key” and the agent did the reading without the key. Instruction is not the same as mechanism, and the gap between them is measurable in the database. The deposit contains the manuscript PDF (21 pages), the testbed, the task definitions, the deterministic matrix (360 runs) and the agent study (124 episodes) with the raw server-side states and audit logs, the analysis and figure scripts, and the evidence table that maps every number in the text to the file it came from.

View source

Similar papers

#computer vision Open access Jun 2016

Software Development in Startup Companies: The Greenfield Startup Model

The results are packaged in the Greenfield Startup Model (GSM), which explains the priority of startups to release the product as quickly as possible, and the need to shorten time-to-market, by speeding up the development through low-precision engineering activities.

Carmine Giardino, Nicolò Paternoster, M. Unterkalmsteiner et al. · 178 citations · ⚡14
#computer vision Open access Oct 2016

Software Startups - A Research Agenda

Software startup companies develop innovative, software-intensive products within limited timeframes and with few resources, searching for sustainable and scalable business models.

M. Unterkalmsteiner, P. Abrahamsson, Xiaofeng Wang et al. · 157 citations · ⚡17
#machine learning Review Open access Oct 2016

“Failures” to be celebrated: an analysis of major pivots of software startups

This study conducts a case survey study based on the secondary data of the major pivots happened in 49 software startups, and demonstrates that customer need pivot is the most common among all pivot types.

Sohaib Shahid Bajwa, Xiaofeng Wang, Anh Nguyen-Duc et al. · 127 citations · ⚡15
#computer vision Review Open access May 2015

A survey study on major technical barriers affecting the decision to adopt cloud services

The comparison of adopter and non-adopter sample reveals three potential adoption inhibitor, security, data privacy, and portability, which underlines the importance of the technical and security perspectives for research investigating the adoption of technology.

Nattakarn Phaphoom, Xiaofeng Wang, S. Samuel et al. · 111 citations · ⚡8
#computer vision Conference Open access Dec 2013

Affordable and Energy-Efficient Cloud Computing Clusters: The Bolzano Raspberry Pi Cloud Cluster Experiment

The ongoing work building a Raspberry Pi cluster consisting of 300 nodes is presented, with potential use cases being an inexpensive and green test bed for cloud computing research and a robust and mobile data center for operating in adverse environments.

P. Abrahamsson, S. Helmer, Nattakarn Phaphoom et al. · 110 citations · ⚡7
#computer vision Book Open access Mar 2017

On the Unhappiness of Software Developers

The results indicate that software developers are a slightly happy population, but the need for limiting the unhappiness of developers remains, and 219 factors representing causes of unhappiness while developing software are identified.

D. Graziotin, Fabian Fagerholm, Xiaofeng Wang et al. · 84 citations · ⚡6

Related blog posts

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.