Linear Thinking, Nonlinear Costs

AI-generated summary of reporting by Oreilly AI ML Blog. Read the original for the full story.

Why it matters

Agent systems built with coding tools like Claude Code can pass tests yet carry hidden retry, recomputation and caching costs that make production AI agents economically unsustainable.

Read this as

This June 16, 2026 O'Reilly article by Nicole Koenigstein argues that AI agent systems, programs where a model calls tools, retries, and reflects before answering, often cost far more than expected because one user request triggers many hidden model calls. The author, an O'Reilly author, says classic computer science tricks like caching and skipping useless paths fix this. Teams building AI agents and paying the bills are affected. The article gives no benchmark numbers or prices.

Koenigstein warns that teams using coding agents such as Claude Code, Codex, and Jules generate agent architectures that are functionally correct but economically wasteful, because the tools won't add cost controls unless explicitly asked. A 60%-reliable step pushed to 99% needs 5 retries, and retries on a flawed model state don't buy independent trials. Hidden cost shows up as latency or the invoice. She advises explicit optimization constraints in SKILL.md or AGENTS.md project instructions.

The piece reframes agent workflows as recursive stateful computation needing classical optimizations: prompt caching for repeated text, memoization of planner decisions modeled as π(S_t) → a_t+1, pruning of unproductive branches (e.g., reflection loops producing only stylistic edits), and dynamic programming for overlapping subproblems. Optimization must follow topology: memoize the planner in centralized systems, cache shared context in decentralized ones, treat memoization as load-bearing in swarms. No benchmarks, tooling, or empirical results are provided.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

Claude Code Codex Jules O'Reilly Nicole Koenigstein SKILL.md AGENTS.md

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading