PreprintCited by 1Software System Performance and ReliabilityLogic, programming, and type systemsDistributed systems and fault tolerance

Token Budgets: An Empirical Catalog of 63 LLM-Agent Budget-Overrun Incidents, with an Affine-Typed Rust Mitigation as a Case Study

Open access
Khan, Sajjad·2026·arXiv

Abstract

LLM-agent budget overruns are a documented production failure class: a single retry loop can spend thousands of dollars before an operator notices, and the in-process integrity properties that would prevent it (no aliasing, no double-spend, no use-after-delegation of a cost-bearing value) are enforced, if at all, by ad-hoc wrappers rather than by the type system. Our central contribution is empirical: a catalog of 63 confirmed production incidents from 21 orchestration frameworks (2023-2026), each backed by a quoted GitHub issue and, where reported, a dollar loss, organized into an eight-cluster failure taxonomy (inter-rater Cohen's kappa = 0.837, N = 113), plus 47 supplementary structural entries. As one mitigation evaluated against this taxonomy, we build token-budgets, an 1,180-line Rust crate (no unsafe) that operationalizes affine ownership so that cloning, double-spending, or using a budget after delegating it are compile errors rather than runtime hazards an operator must remember to avoid. The dollar cap is runtime arithmetic under an estimator assumption; the affine layer makes that arithmetic non-bypassable. On single-agent workloads a 4-line Python counter matches the crate at 0/30 overshoot, so the distinguishing value is non-bypassability under operator error in multi-agent delegation: the delegation-fanout race documented in 11 incidents is rejected by the borrow checker at compile time, while the same pattern under asyncio overshoots 30/30 and three disciplined alternatives overshoot 0/30. Across five runtimes, three providers, and a temperature-stratified live-API test (N = 160), the approach reports zero cap violations and zero false refusals, at operational parity with concurrent work. Static over-reservation is 4-6x (2.11x adaptive). Binary-level cap-soundness on the running binary is left open.

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

DataCite · 10.48550/arxiv.2606.04056

Cites

Statistics

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

  • Agent Contracts gives a formal multidimensional resource-contract framework with conservation across hierarchical, parallel, and recursive delegation; retrieval-conditioned topology selection proves a six-dimensional budget algebra for changing multi-agent topologies; and Token Budgets uses affine ownership to prevent clone, double-spend, and use-after-delegation failures.

    “Agent Contracts gives a formal multidimensional resource-contract framework with conservation across hierarchical, parallel, and recursive delegation; retrieval-conditioned topology selection proves a six-dimensional budget algebra for changing multi-agent topologies; and Token Budgets uses affine ownership to prevent clone, double-spend, and use-after-delegation failures [13, 27, 33].”

    From Authorization for Self-Modifying AI Agent Populations: Conserving Authority across Replacement, Forking, and Rollback (2026) · cites this paper as [13]

    Split into 3 atoms — 2 confirmed, 1 partially supported, 0 disputed, 0 misattributed, 0 unverifiable. Expand the claim to see per-atom verdicts.

    Experimental — accuracy not yet measured

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Cites

No references could be resolved yet.

Research works printed but not linked: 57

  1. P. Wadler. "Linear types can change the world." In Programming Concepts and Methods, M. Broy and C. Jones, eds., North-Holland, 1990, pp. 561- 581.
  2. K. Krippendorff. Content Analysis: An Introduction to Its Methodology. 3rd edition, SAGE Publications, 2013.
  3. D. S. Cruzes and T. Dybå. "Recommended steps for thematic synthesis in software engineering." In Proc. Int. Symp. on Empirical Software Engineering and Measurement (ESEM), IEEE, 2011, pp. 275-284.
  4. J. Saldaña. The Coding Manual for Qualitative Researchers. 3rd edition, SAGE Publications, 2016.
  5. P. Runeson and M. Höst. "Guidelines for conducting and reporting case study research in software engineering." Empirical Software Engineering, 14(2):131-164, 2009.
  6. C. Wohlin, P. Runeson, M. Höst, M. C. Ohlsson, B. Regnell, and A. Wesslén. Experimentation in Software Engineering. Springer, 2012.
  7. E. Kalliamvakou, G. Gousios, K. Blincoe, L. Singer, D. M. German, and D. Damian. "The promises and perils of mining GitHub." In Proc. Working Conf. on Mining Software Repositories (MSR), ACM, 2014, pp. 92-101 (extended as "An in-depth study of the promises and perils of mining GitHub," Empirical Software Engineering, 21(5):2035-2071, 2016).
  8. R. E. Strom and S. Yemini. "Typestate: a programming language concept for enhancing software reliability." IEEE Trans. Software Engineering 12(1):157-171, 1986.
  9. J. Aldrich, J. Sunshine, D. Saini, and Z. Sparks. "Typestate-oriented programming." In Companion to OOPSLA 2009, ACM, 2009.
  10. R. Jung, J.-H. Jourdan, R. Krebbers, and D. Dreyer. "RustBelt: securing the foundations of the Rust programming language." Proc. ACM on Programming Languages 2(POPL), 2018.
  11. D. Yuan, Y. Luo, X. Zhuang, G. R. Rodrigues, X. Zhao, Y. Zhang, P. U. Jain, and M. Stumm. "Simple testing can prevent most critical failures: an analysis of production failures in distributed data-intensive systems." In USENIX OSDI 2014, pp. 249-265.
  12. S. Lu, S. Park, E. Seo, and Y. Zhou. "Learning from mistakes: a comprehensive study on real-world concurrency bug characteristics." In Proc. ASPLOS XIII, ACM, 2008, pp. 329-339.
  13. G. Klein, K. Elphinstone, G. Heiser, J. Andronick, D. Cock, P. Derrin, D. Elkaduwe, K. Engelhardt, R. Kolanski, M. Norrish, T. Sewell, H. Tuch, and S. Winwood. "seL4: formal verification of an OS kernel." In Proc. SOSP 2009, ACM, pp. 207-220.
  14. Q. Ye and J. Tan. "Agent Contracts: a formal framework for resource- bounded autonomous AI systems." arXiv preprint 2601.08815, January 2026 (last revised 25 March 2026, v3; accepted at COINE 2026 workshop, AAMAS 2026, Paphos, Cyprus). https://arxiv.org/abs/2601.08815. Ref- erence implementation: https://github.com/flyersworder/agent-contracts (PyPI: ai-agent-contracts, v0.3.1). · arXiv
  15. S. Clebsch, S. Drossopoulou, S. Blessing, and A. McNeil. "Deny capabilities for safe, fast actors." In Proc. AGERE! 2015, ACM, pp. 1-12.
  16. L. Chen, M. Zaharia, and J. Zou. "FrugalGPT: How to use large language models while reducing cost and improving performance." arXiv preprint arXiv:2305.05176, 2023. · arXiv
  17. A. Lattuada, T. Hance, C. Cho, et al. "Verus: Verifying Rust programs using linear ghost types." Proceedings of the ACM on Programming Languages (OOPSLA), 2023.
  18. T. Hance, L. Elbeheiry, Y. Matsushita, and D. Dreyer. "VerusBelt: A Semantic Foundation for Verus's Proof-Oriented Extensions to the Rust Type System." PLDI 2026.
  19. J. Hoffmann, K. Aehlig, and M. Hofmann. "Multivariate amortized resource analysis." ACM TOPLAS, 34(3), 2012. [Cited as exemplar of static resource analysis tradition.]
  20. E. Hildenbrandt et al. "KEVM: A Complete Formal Semantics of the Ethereum Virtual Machine." CSF 2018, pp. 204-217.
  21. P. Wang, H. Fu, K. Chatterjee, Y. Deng, and M. Xu. "Proving expected sensitivity of probabilistic programs with randomized variable-dependent termination time." Proc. ACM Program. Lang., 4(POPL), Article 25, 2020.
  22. R. Jung, R. Krebbers, J.-H. Jourdan, A. Bizjak, L. Birkedal, and D. Dreyer. "Iris from the ground up: A modular foundation for higher-order concurrent separation logic." Journal of Functional Programming, vol. 28, e20, 2018.
  23. Y. Matsushita, T. Tsukada, and N. Kobayashi. "RustHorn: CHC-based verification for Rust programs." ESOP 2020: Programming Languages and Systems, LNCS 12075, pp. 484-514, Springer, 2020.
  24. L. Gaeher et al. "RefinedRust: A type system for high-assurance verification of Rust programs." Proc. ACM on Programming Languages, vol. 8, no. PLDI, Article 192, June 2024.
  25. R. Atkey. "Syntax and semantics of quantitative type theory." LICS 2018: Logic in Computer Science, ACM/IEEE, 2018, pp. 56-65.
  26. A. C. Bomberger, A. P. Frantz, W. S. Frantz, A. C. Hardy, N. Hardy, C. R. Landau, J. S. Shapiro. "The KeyKOS nanokernel architecture." USENIX Workshop on Micro-Kernels and Other Kernel Architectures, 1992.
  27. J. S. Shapiro, J. M. Smith, D. J. Farber. "EROS: A fast capability system." SOSP 1999: Operating Systems Principles, ACM, 1999, pp. 170-185.
  28. R. N. M. Watson et al. "CHERI: A hybrid capability-system architecture for scalable software compartmentalization." IEEE Symposium on Security and Privacy, 2015, pp. 20-37.
  29. A. Mettler, D. Wagner, T. Close. "Joe-E: A security-oriented subset of Java." NDSS 2010.
  30. M. S. Miller. "Robust composition: Towards a unified approach to access control and concurrency control." PhD thesis, Johns Hopkins University, 2006.
  31. E. Albert, P. Gordillo, A. Rubio, I. Sergey. "GASTAP: A gas analyzer for smart contracts." IEEE Access, vol. 10, pp. 50472-50495, 2022.
  32. N. Grech, M. Kong, A. Jurisevic, L. Brent, B. Scholz, Y. Smaragdakis. "MadMax: Surviving out-of-gas conditions in Ethereum smart contracts." Proceedings of the ACM on Programming Languages, vol. 2, OOPSLA, article 116, 2018.
  33. N. Vazou, E. L. Seidel, R. Jhala, D. Vytiniotis, and S. Peyton Jones. "Refinement types for Haskell." In Proc. ICFP, 2014.
  34. B. L. Kaminski, J.-P. Katoen, C. Matheja, and F. Olmedo. "Weakest precondition reasoning for expected runtimes of randomized algorithms." Journal of the ACM, 65(5):1-68, 2018.
  35. P. Wang, D. Fu, A. K. Bouajjani, H. Yang, and J. Hoffmann. "Raising expectations: Automating expected cost analysis with types." Proc. ACM Program. Lang., 4(ICFP):1-31, 2020.
  36. J.-P. Bernardy, M. Boespflug, R. R. Newton, S. Peyton Jones, and A. Spiwack. "Linear Haskell: practical linearity in a higher-order polymorphic language." Proc. ACM Program. Lang., 2(POPL):1-29, 2018.
  37. A. Verma, L. Pedrosa, M. Korupolu, D. Oppenheimer, E. Tune, and J. Wilkes. "Large-scale cluster management at Google with Borg." In Proc. EuroSys, 2015.
  38. J. S. Turner. "New directions in communications (or which way to the information age?)." IEEE Communications Magazine, 24(10):8-15, 1986.
  39. H. Garcia-Molina and K. Salem. "Sagas." In Proc. SIGMOD, 1987.
  40. C. Gray and D. Cheriton. "Leases: an efficient fault-tolerant mechanism for distributed file cache consistency." In Proc. SOSP, 1989, pp. 202-210.
  41. K. Honda, V. T. Vasconcelos, and M. Kubo. "Language primitives and type discipline for structured communication-based programming." In Proc. ESOP, 1998.
  42. I. Mironov. "Rényi differential privacy." In IEEE Computer Security Foundations Symposium (CSF), 2017, pp. 263-275.
  43. M. Abadi, A. Chu, I. Goodfellow, H. B. McMahan, I. Mironov, K. Talwar, and L. Zhang. "Deep learning with differential privacy." In ACM CCS, 2016, pp. 308-318.
  44. D. Orchard, V.-B. Liepelt, and H. Eades III. "Quantitative program reasoning with graded modal types." Proc. ACM Program. Lang., 3(ICFP), Article 110, 2019.
  45. M. Gaboardi, S.-y. Katsumata, D. Orchard, F. Breuvart, and T. Uustalu. "Combining effects and coeffects via grading." In Proc. ICFP, 2016, pp. 476-489.
  46. A. Ghodsi, M. Zaharia, B. Hindman, A. Konwinski, S. Shenker, and I. Stoica. "Dominant resource fairness: Fair allocation of multiple resource types." In NSDI, 2011.
  47. A. Gulati, A. Merchant, and P. J. Varman. "mClock: Handling throughput variability for hypervisor IO scheduling." In USENIX OSDI, 2010.
  48. O. Khattab, A. Singhvi, P. Maheshwari, Z. Zhang, K. Santhanam, S. Vardhamanan, S. Haq, A. Sharma, T. T. Joshi, H. Moazam, H. Miller, M. Zaharia, and C. Potts. "DSPy: Compiling declarative language model calls into state-of-the-art pipelines." In Proc. ICLR, 2024.
  49. R. N. M. Watson, J. Anderson, B. Laurie, and K. Kennaway. "Capsicum: practical capabilities for UNIX." In USENIX Security Symposium, 2010.
  50. J. Sunshine, K. Naden, S. Stork, J. Aldrich, and É. Tanter. "First-class state change in Plaid." In OOPSLA, 2011.
  51. M. Coblenz, R. Oei, T. Etzel, P. Koronkevich, M. Baker, Y. Bloem, B. A. Myers, J. Aldrich, and J. Sunshine. "Obsidian: typestate and assets for safer blockchain programming." ACM TOPLAS, 42(3), 2020.
  52. R. DeLine and M. Fähndrich. "Enforcing high-level protocols in low-level software." In PLDI, 2001.
  53. N. Shinn, F. Cassano, A. Gopinath, K. Narasimhan, and S. Yao. "Reflexion: language agents with verbal reinforcement learning." In NeurIPS, 2023.
  54. S. Yao, J. Zhao, D. Yu, N. Du, I. Shafran, K. Narasimhan, and Y. Cao. "ReAct: synergising reasoning and acting in language models." In ICLR, 2023.
  55. L. Wang, C. Ma, X. Feng, Z. Zhang, H. Yang, J. Zhang, Z. Chen, J. Tang, X. Chen, Y. Lin, W. X. Zhao, Z. Wei, and J.-R. Wen. "A survey on large language model based autonomous agents." Frontiers of Computer Science, 18(6), 2024.
  56. N. F. Liu, K. Lin, J. Hewitt, A. Paranjape, M. Bevilacqua, F. Petroni, and P. Liang. "Lost in the middle: how language models use long contexts." TACL, 12:157-173, 2024.
  57. K. Opsahl-Ong, M. J. Ryan, J. Purtell, D. Broman, C. Potts, M. Zaharia, and O. Khattab. "Optimizing instructions and demonstrations for multi- stage language model programs." In EMNLP, 2024.

Authors
Khan, S.
Affiliations
University of the West of England (GB)
Corresponding author
Khan, Sajjad
Venue
arXiv
Publisher
arXiv
Published
2026
ISSN
2331-8422 (ISSN-L)
OpenAlex
W7163515152
Cited by
0
References
0
Type
posted content
Language
en
Open access
Locations
  • arXiv (Cornell University) (submittedVersion, cc-by)
  • arXiv (Cornell University) (cc-by)
Topics
  • Physical Sciences › Computer Science › Computer Networks and Communications › Software System Performance and Reliability
  • Physical Sciences › Computer Science › Artificial Intelligence › Logic, programming, and type systems
  • Physical Sciences › Computer Science › Computer Networks and Communications › Distributed systems and fault tolerance
Keywords
LLM agents, cost containment, failure mitigation

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review