The bill for running Claude in production is often two to ten times higher than it needs to be. That’s the uncomfortable implication of a talk by Lance Martin, a member of technical staff at Anthropic, who walked through what he called “prompt debt” and its downstream costs at the AI Engineer conference — and showed that one command inside Claude Code can strip up to 72% of the cost from an application with no meaningful change in output quality.

The problem isn’t the model. It’s the scaffolding around it. Instructions that helped earlier, weaker models — “think step by step,” “double-check your work,” “be maximally thorough” — now just burn tokens on frontier models that already do all of those things automatically. As Martin put it, “Prompts accumulate debt just like code.” And like code debt, someone eventually has to pay for it.

The prompts that once helped now hurt

Martin identifies a specific class of anti-patterns that should be stripped from any prompt feeding a current-generation Claude model: reasoning instructions (“think step by step”), verification rituals (“double check your work”), thoroughness boosters (“be maximally thorough”), and hand-holding scratchpads that dictate how and where the model should think. Frontier models already think, decide when to think, and verify their own work. Telling them to do so mostly manufactures token spend.

The second failure mode is contradictory instructions. Older models would silently drop one of two conflicting rules and keep functioning. Frontier models get confused by the contradiction and produce worse output. Either way, the user pays — in tokens, latency, or quality.

The fix, Martin says, is not a manual rewrite. In Claude Code, running checkup prompt audit audits the entire configuration — skills, prompts, setup — while claude api prompt audit targets code calling the API. Both scan the working directory and automatically remove anti-patterns. On a synthetic customer-support evaluation of 50 tickets simulating a migration from Opus 4.8 to Opus 5.5, running the audit on top of the model upgrade delivered further gains on both cost and quality, because it removed boosters and verification rituals that were forcing Opus 5.5 to spend excessive tokens.

Caching is the closest thing to free money — and most teams botch it

The second lever is prompt caching, which Martin frames as near-free savings: cached tokens bill at roughly a tenth of the base rate, and he flags that pricing varies by model (check the pricing page). Cached tokens are also faster, which matters enormously in multi-turn agent applications where the same large context gets reprocessed on every turn.

The catch is that the cache works on a strict prefix match. A single byte change early in the prompt invalidates everything downstream. That makes prompt architecture a cost-engineering discipline, not a stylistic choice. Martin’s canonical layout places the most stable material first:

LayerScopeCache behaviorSystem instructions, toolsGlobalCached across all sessionsCLAUDE.md / memoryPer projectCached per projectSession statePer sessionCached per sessionMessagesPer turnIncremented each turn

Claude Console surfaces prompt-cache hit-rate diagnostics for API applications, and Martin says Anthropic tracks Claude Code’s hit rate “very, very religiously” because it drives the unit economics of the product. Running claude api cache diagnostics finds opportunities to reorganize prompts for higher hit rates and also examines effort levels and prompt content for waste.

The result is startling: Martin’s Applied AI team ran the audit against a set of internal benchmarks with default harnesses and “found opportunities to reduce costs by up to 72% with no meaningful change in performance just by running this command, because some of the harnesses on these evals were not using the prompt cache properly.” That’s not a marginal optimization. That’s a structural error in how most teams wire up their agents.

A benchmark an agent cannot improve against is a benchmark that cannot help you

The largest portion of Martin’s talk is about evaluation design, because everything downstream depends on it. His core observation: “Claude, Frontier Claude in particular, is very good at self-correction. So if you give Claude a well-structured evaluation, it can basically just hill climb in that eval.” The capability exists. What’s missing is a target worth climbing toward.

He lays out four properties a good eval must exhibit, illustrated by plotting score against tokens-per-attempt for Claude models at the Opus, Sonnet, and Haiku tiers:

Performance rises as you step up the model tier.
Performance rises as you increase thinking effort.
There is headroom left at the frontier — the eval is not saturated.
Run-to-run variance is low.

The most common failure he sees is an ambiguous eval that no model can solve, which creates the illusion of headroom. Teams then spend large token budgets hill-climbing toward a ceiling that doesn’t exist. The claude api build eval skill is deliberately agnostic about where evaluation data lives — it can point at any tracing solution — and walks the user through constructing an eval set from raw traces: viewing the data, drafting a grader, and checking the criteria against these four principles.

Hill climbing works — but overfitting is the default outcome

Once a climbable eval exists, claude api hill climb runs the improvement loop autonomously: “autonomously looking at an evaluation and autonomously kind of improving on it without you in the loop,” as Martin describes it. But his central warning is that overfitting to the eval distribution is the baseline failure mode. A harness that adds an OCR tool because one test needs OCR, or a prompt tuned to distinctive phrasing in the eval examples, will look outstanding on the benchmark and do nothing in production. He calls this the major concern and notes the frustration of spending heavily on a climb that yields no production gain.

The skill’s primary defense is a conventional train/test split. It only looks at the train split when deciding what to change; each round it checks test and train performance side by side. Train improving while test stays flat is the early overfitting signal. Martin is explicit that this is imperfect and a human should remain in the loop.

His worked example is the Claude API skill itself — documentation that teaches Claude about Anthropic’s SDKs and APIs, and must stay grounded in the docs. On an eval built from that documentation, the skill initially scored 66%. Given access to the skill text and the docs, Claude Code iterated on failures and improved substantially. His takeaway: text-based surfaces — prompts and skills — are the best starting point for hill climbing because they’re clearly coupled to model behavior and cheap to modify, though they’re also the easiest thing to overfit.

He also flags that the climb isn’t guaranteed to converge. When the skill stalls for several rounds, it clusters the remaining failures and looks for the cause — frequently ambiguous or faulty grader examples rather than model limitations. In his own cost-climbing run, the agent stalled, clustered the failures, found ambiguous cases, and rewrote them.

Pointing the same loop at cost returned a 90% cut

The striking result comes from redirecting the climber at cost rather than quality. Told to reduce spending at performance parity, it searches model, effort, and prompt configurations. Starting from Opus 4.8 at high effort with a baseline prompt, it moved to Opus 5.5 at low effort (performance up, cost slightly down), then to Fable at low effort (performance up further, cost down sharply), then tuned the prompt to recover any lost performance. The final result: roughly a 90% cost reduction with a notable performance improvement — entirely autonomous.

Underlying that result is a principle Martin says the skill bakes in, and one that runs against common instinct: “There’s generally an intuition that moving to higher models at lower effort is often cheaper and more performant than lower models at high effort. It’s like giving someone who’s smarter, can try less to actually get a better objective.” His practical advice: “Try low to start. You can always dial back up… very, very smart model, not trying too hard. That’s often a sweet spot.” He notes Haiku 4.5 at low effort was a significant regression in his run and was rejected.

He also clarifies what “effort” means: not a hard token cap, but guidance on how hard to think. On simple problems even maximum effort won’t balloon. On frontier problems — especially hard coding tasks — extra-high effort can produce large token differences with little outcome difference, because the model does more verification work. Because cost climbing works even on a saturated eval, it’s useful precisely for teams whose benchmarks are already maxed out.

When agents run for days, the architecture has to change

Martin closes by tying harness design to rising task duration. Anthropic’s own measurement curve tells the story: “Cloud Opus 3 was capable of only, like, four minutes of autonomous work” — a regime that supported autocomplete and chat. Through 2025, models reached one to two hours of human-equivalent work, where Claude Code took off. Current models, he says, “are kind of entering a new regime now where these task durations for models are exceeding like a day to two days.” In that regime, the design questions shift from capability to security and reliability over long unattended runs.

The architecture he advocates, behind the Claude Managed Agents API, is “decoupling the brain from the hands.” The harness is the brain; sandboxes are the hands where code runs. The session log is an independent, append-only object separate from both, so if the harness or sandbox dies mid-run, an orchestrator boots a replacement and the system recovers from the log. Secrets live in vaults the model never reads directly, so the agent can reference API keys without seeing them — a critical property when an agent runs for days.

He points to a companion blog written with CJ that walks through building a scheduled agent for regular context updates — pulling from specified sources and writing to Slack — on Anthropic infrastructure. The onboarding entry point is claude api managed onboard.

The practical playbook: evals, rubrics, and where humans stay in the loop

The Q&A surfaces most of the operational detail. On automating eval design, Martin agrees with Hamel Husain’s critique that the skill should show the user raw data before analyzing it, and says a PR to add a data-viewer stage is in progress. His preferred division of labor: a human steers what matters and why; Claude scans traces like an online evaluator to flag likely failures; the human reviews those cases; then they’re promoted into the eval set.

On grading open-ended outputs, he offers a concrete rubric: build a rubric a human could apply; avoid arbitrary 0–5 or 1–10 scales in favor of crisp binary classifiers (multiple binaries rather than one fuzzy scale); verify that Sonnet, Opus, and Fable grade consistently; and run replicates to confirm low variance. Pairwise comparison is his preferred approach where the problem allows it, because comparing two artifacts is easier and less noisy than scoring one — he cites generative-UI evals scored pairwise and aggregated into Elo ratings.

On eval distribution, he warns against adversarial sampling — promoting only cases a specific model fails — because model intelligence is jagged and one model’s failure pocket may be trivially solved by the next, producing an eval shaped for the wrong valleys. Cases should be promoted from first principles, intuition, and production data instead.

Other points:

When to build an eval: it depends on task importance, not personal vs. production. A finance professional automating work whose output gets shared externally should build one; a personal calendar assistant may not need one.
Observability tooling: he declines to endorse a vendor (he previously worked at LangChain) and notes that at small scale you can roll your own, and that Claude is good at building bespoke data-viewer UIs cheaply.
Who owns evals: at Anthropic it’s not delineated by team — anyone who owns the product is empowered to build them, and the skills lower the bar enough that many non-engineering roles now do.
Multi-turn evals: agents generally need them; competing philosophies exist about grading the full trajectory versus the final outcome.
Context engineering: his highest-value reliability trick is separating the context object from the harness in an RLM style, so the model interrogates an independent, recoverable context store. With ordinary message history, a compaction event destroys what was summarized; with a separate object, the agent can always go back and query it.
Eval awareness: he treats overfitting as the practical concern rather than the model knowing it’s being tested.
Auto research: the hill-climbing intuition — a clear verifiable objective plus autonomous iteration — applies beyond evals to objectives like loss on a nanoGPT-style repository.
Multi-objective climbing: feasible (cost, performance, speed), but each added objective makes the search harder; change one thing at a time.
Production loop: online evaluators score deployed traces; low scorers get promoted to an offline eval set; hill climbing runs on those; then regression tests once they pass.
Model upgrades and evals: if a well-built eval doesn’t show performance rising as models improve, question the eval, not the model.

What this means for anyone paying the AI bill

The through-line is that frontier capability is usually present but blocked by configuration: stale prompts, broken cache prefixes, unclimbable evals, harnesses that can’t survive a day-long run. The cheapest wins come from fixing the scaffolding, not buying a bigger model. That reframes spending: the most valuable thing a team can do this quarter isn’t upgrading a model tier — it’s running a prompt audit and a cache diagnostic, both of which are single commands that have already delivered 72% cost cuts with no quality loss internally.

The unresolved tension is overfitting. The same text surfaces that make hill climbing easy also make it easy to tune a prompt into a shape that only wins on the benchmark, and a train/test split is a mitigation, not a guarantee. That matters more as agents run longer and their outputs carry more consequence.

For investors, the signal cuts in two directions. If Jensen Huang’s customers can cut 72% to 90% of inference spending through configuration alone, the revenue-per-query growth story gets more complicated — but so does the retention story, because teams that get these economics right will build more agents and run them far longer. The clearest thing to watch is whether the managed-agents pattern becomes the default harness for multi-day autonomous work. Anthropic’s own METR evaluation, which found its models improving roughly 1.9 times faster than historical rates and attributed about 80% of that acceleration to AI assistance, suggests the capability curve is still steepening. The companies that learn to operate at the frontier of cost and reliability — not just the frontier of intelligence — will be the ones left standing when task durations stretch from days to weeks.