Resources / agent business case 02

The Cost-Ceiling Workbook

Price an AI agent the way your CFO will see it: per attempt, per accepted result, per period, and what it costs when the ceiling stops the work.

Download the workbook (.xlsx)  Try the calculator

Free resource. Companion to Agentic system design, Episode 5. Model prices checked 16 September 2026.

01 The 01:52 problem

The control worked perfectly.

A composite scenario with illustrative numbers. It is not an account of a real airline, a real incident or a real bill.

A storm night, and an airline rebooking agent. Six hours, 38,000 passengers to move, against 2,000 on a normal day. The agent had run for months without anybody thinking hard about what it cost.

Retries rose from 1.3 to 3.1 attempts per passenger. Every single attempt stayed under its $0.40 cap, so no per-attempt control ever fired. 600 attempts were in flight at once against a $26,600 shared ceiling. The price per token did not change that night. Cost per passenger rose 3.5x anyway.

At 01:52 the ceiling tripped. 2,926 rebookings froze in a state no operator queue showed. The control saved $2,219 in tokens. The airline paid $351,120 in hotel vouchers.

A cost ceiling is a business decision wearing an engineering costume.

02 What it answers

Four questions, in the order the workbook asks them.

  1. What does one attempt really cost once context re-sending, caching, reasoning tokens and tools are counted?
  2. What does a completed case cost, and what does the whole period cost, in a normal and a stressed scenario?
  3. If several workers share one ceiling, how far can spend overshoot it, and what does a reservation cost in headroom?
  4. When the ceiling trips, is stopping actually cheaper than continuing?
03 The calculator

The same model as the workbook, in the browser.

Every value below is an invented teaching value. Change any of them and every figure recalculates as you type. Nothing is stored and nothing is sent anywhere, so a refresh puts the example back.

Cost per attempt $0.2446 Model tokens plus tools, one attempt.
Agent cost per case $0.7584 Agent spend only, divided by cases.
Fully loaded cost per accepted result $1.70 Everything, divided by the cases that met the acceptance definition. This is the number to argue about.

Storm night. The normal day is in step 1 and step 2.

1 · What one attempt costs

Normal day 24 hours, ordinary traffic.

Trackers · checked 16 September 2026

turns

Storm night: a slow seat-availability API adds turns.

tokens per turn

Stable system prompt and tool schemas, sent every turn.

tokens

Booking record, disruption notice, policy extract.

tokens

Tool results and prior output, re-sent on later turns.

tokens
tokens

Billed as output. Often the largest hidden line.

%

Cache expiry during bursty traffic lowers this.

on or off

A live rebooking agent cannot wait.

USD

Seat search, fare quote, notification calls.

Total input tokens
76,500
Cache read
32,400
Cache write
3,600
Uncached input
40,500
Output tokens
6,000
Last turn's input
16,500
Last turn vs first
1.8x
Cache read cost
$0.0065
Cache write cost
$0.0090
Uncached input cost
$0.0810
Output cost
$0.0600
Output's share of model cost
38.3%
Reasoning's share of output
60.0%
Model cost
$0.1565
Cost per attempt
$0.1665

Storm night Six hours, the disruption.

Trackers · checked 16 September 2026

turns

Storm night: a slow seat-availability API adds turns.

tokens per turn

Stable system prompt and tool schemas, sent every turn.

tokens

Booking record, disruption notice, policy extract.

tokens

Tool results and prior output, re-sent on later turns.

tokens
tokens

Billed as output. Often the largest hidden line.

%

Cache expiry during bursty traffic lowers this.

on or off

A live rebooking agent cannot wait.

USD

Seat search, fare quote, notification calls.

Total input tokens
114,000
Cache read
43,200
Cache write
4,800
Uncached input
66,000
Output tokens
8,000
Last turn's input
19,500
Last turn vs first
2.2x
Cache read cost
$0.0086
Cache write cost
$0.0120
Uncached input cost
$0.1320
Output cost
$0.0800
Output's share of model cost
34.4%
Reasoning's share of output
60.0%
Model cost
$0.2326
Cost per attempt
$0.2446

2 · What the period costs

Normal day 24 hours, ordinary traffic.

hours
cases
attempts

Late tool responses and timeouts drive retries under load.

%

Use one written acceptance definition for both scenarios.

%
minutes
USD per hour
runs
tokens
tokens
on or off
USD

Allocate shared cost to the period once.

multiplier

Reporting basis: USD, no conversion. The rate multiplies the total and nothing else.

Attempts
2,600
Agent cost
$432.85
Background jobs
$12.00
Human review
$480.00
Fixed cost
$60.00
Total for the period
$984.85
In reporting currency
$984.85
Accepted results
1,840
Agent cost per case
$0.2164
Fully loaded cost per accepted result
$0.5352

Storm night Six hours, the disruption.

hours
cases
attempts

Late tool responses and timeouts drive retries under load.

%

Use one written acceptance definition for both scenarios.

%
minutes
USD per hour
runs
tokens
tokens
on or off
USD

Allocate shared cost to the period once.

multiplier

Reporting basis: USD, no conversion. The rate multiplies the total and nothing else.

Attempts
117,800
Agent cost
$28,819
Background jobs
$27.00
Human review
$22,800
Fixed cost
$40.00
Total for the period
$51,686
In reporting currency
$51,686
Accepted results
30,400
Agent cost per case
$0.7584
Fully loaded cost per accepted result
$1.70

The storm night costs 3.5x per case what the normal day costs. The price per token never moved.

3 · What a shared ceiling actually holds

This step and the next one run against the storm night. A ceiling that is never approached on a normal day tells you nothing.

USD

One budget, claimed against by every worker at once.

USD

The worst case a single attempt may reach before it is stopped.

attempts

Every one of them can read the same balance before any of them writes.

minutes

Money already spent that the provider has not reported yet.

Cases completed before the ceiling trips
35,074
Cases stranded
2,926
Check-then-act overshoot
$240.00
That overshoot, as a share of the ceiling
0.9%
Reserve-then-settle overshoot
$0.0000
Headroom locked by live claims
$93.22
Spend per minute
$80.05
Spent but not yet billed
$4,803

Check-then-act means every worker reads the balance and then writes. Between the read and the write, every other worker sees the same balance, so the ceiling is breached by one full cap for each of them.

Reserve, then settle

  1. Before an attempt starts, atomically claim its worst-case cost from the shared ceiling. If the claim fails, do not start.
  2. When the attempt ends, record the actual cost and release the unused part of the claim.
  3. If a worker dies, expire its claim after a timeout and send the case to review instead of retrying silently.
  4. Reconcile claims against provider usage on a schedule. The provider bill is the final record.

The overshoot above is zero only when the reservation is atomic and every retry reserves again. A reservation that is not atomic is check-then-act under a better name.

4 · Whether stopping is cheaper than continuing

USD

The voucher, the compensation, the call. Not a token cost.

%

Some frozen cases resolve themselves. Most, on a storm night, do not.

minutes
USD per hour
%

The rest still incur the business cost, after the human time is spent.

Token cost the ceiling avoided
$2,219
Business cost per dollar avoided
$158.23
Break-even business cost per frozen case
$0.7584

Above this business cost per frozen case, freezing costs more than finishing the case with the agent.

Option A

Continue

$2,219

Lift the ceiling and finish the frozen cases with the agent. Costs the token spend the ceiling avoided.

Option B

Freeze

$351,120

Leave the cases stopped and pay whatever a frozen case costs the business.

Option C

Route to people

$122,892

Send the frozen cases to a human queue. Costs the human time, plus the business cost on the ones people do not resolve.

On these numbers the lowest-cost option is A (continue). The ceiling saved $2,219 in tokens and cost $351,120 in vouchers.

04 The boundary register

A limit nobody wrote down is a limit nobody owns.

Eleven fields per boundary. One row is filled in below as an example; the editable version is the Boundaries tab of the workbook.

The boundary register: eleven fields, with one example row filled in.
BoundaryLimitUnitEnforcement pointStop behaviourState preservedOwnerCost of stopping per caseTest caseEvidenceReview trigger
Aggregate period cost26,600USD per disruption nightBudget service: atomic reservation before each attemptStop new cases; finish in-flight attempts; route new cases to the disruption desk queueCase id, passenger contact, last confirmed seat hold, attempts so farDisruption ops lead$120600 concurrent attempts at 99% of ceiling, with the seat API responding lateLoad-test report and reconciliation against provider usageVolume change over 20%, model or price change, voucher policy change

Eight boundaries to fill in

  • Attempts per case
  • Model turns per attempt
  • Tool calls per attempt
  • Elapsed time per case
  • Cost per attempt
  • Aggregate period cost
  • Concurrent in-flight attempts
  • Background job spend

Seven tests before trusting any boundary

  1. At the limit A case whose next attempt would cross the cap stops cleanly, and its state is visible to an operator.
  2. Repeated submission An idempotency key prevents a second rebooking or a second charge.
  3. Concurrency Many workers claim the shared ceiling at once, and total claims never exceed the ceiling.
  4. Late tool response A seat API answer arriving after a timeout does not create a second seat hold or silently restart the case.
  5. Worker failure An expired claim is released and the case appears in a review queue.
  6. Billing reconciliation Local reservations are compared with provider usage after the lag window, and the difference and its investigator are recorded.
  7. Model swap A cheaper per-token model is compared on cost per accepted result for the same cases, not on rate cards.
05 How to use the workbook

Seven tabs, and four colours.

Start
Read the legend, set your reporting currency, and pick the model you are pricing.
Prices
The price card, with a Custom row for a rate you have been quoted.
Attempt
What one attempt costs, broken into cached input, uncached input, output and tools.
Period
Two scenarios side by side, from cost per attempt to fully loaded cost per accepted result.
Ceiling
How far a shared ceiling overshoots under concurrency, and what a reservation locks up.
Stopping
The three options when the ceiling trips, priced against each other.
Boundaries
The register: eleven fields per boundary, with one row filled in as an example.

The legend

  • Blue text is an input. Change it.
  • Yellow fill is a key assumption. Change it, and write down why.
  • Green text is linked from another tab. Change it at the source.
  • Black is a formula. Leave it alone unless you mean to change the model.

Download the workbook (.xlsx) 

06 Prices and tokenomics

Model choice is usually the largest lever.

Model prices in USD per million tokens, checked on 16 September 2026.
Model Input Output Cache read Cache write (5 min) Batch discount Source Note
Claude Opus 5 5 25 0.5 6.25 50% Anthropic pricing via trackers Cache read 0.1x input; 5-minute write 1.25x
Claude Sonnet 5 2 10 0.2 2.5 50% Trackers Most report $2/$10 permanent; one lists $3/$15. Verify.
Claude Haiku 4.5 1 5 0.1 1.25 50% Trackers
Claude Fable 5.1 10 50 0.25 50% Trackers Cache read from one tracker only
GPT-5.6 Sol 4 20 Tracker Enter cache and batch terms from provider
Gemini 3.1 Pro 2 12 Tracker Enter cache and batch terms from provider
Low-cost open model 0.3 1.2 Tracker (MiniMax M3) Check data-governance terms
Custom yours yours yours yours yours User-entered rate

USD per million tokens. A dash means the term was not published. The calculator charges a blank cache price at the input price and treats a blank batch discount as none, which is the pessimistic reading and the only safe one.

2026 tokenomics

  • Output tokens usually cost several times input (5x on current Claude tiers). Reasoning tokens are billed as output even when you never display them.
  • An agent re-sends its accumulated context on every turn, so input tokens grow with the square of the turn count.
  • Across current models, output prices span roughly $0.50 to $50 per million tokens, so model choice is usually the largest single lever.
  • Cache reads on current Claude models cost about a tenth of input price. Batch processing halves eligible cost but only suits work that can wait.
  • A cheaper price per token can still cost more per case if the model takes more turns or retries. Compare cost per accepted result, not rate cards.
  • Prices moved several times between June and September 2026. Record the checked date and re-run the estimate when a rate changes.

Prices were compiled from public pricing pages and trackers on 16 September 2026. Trackers disagreed on at least one current rate. Verify on the provider’s own pricing page before relying on any figure.

07 Caveats

What this does not give you.

  • All example values are invented teaching values, not prices, forecasts or observed results.
  • This workbook supplies no universally safe budget.
  • Money is not the only stopping cost. If a stopped case can cause harm, a regulatory breach or an unsafe action, the ceiling may be right even when it costs more.

Two neighbours

  • Cost-ceiling worksheet Cost-ceiling worksheet — One page, one workflow. Decide what it may spend or repeat and who reviews the result, with no arithmetic.
  • The Run-Cost Model The Run-Cost Model — Twelve months, four ways to do the same job. The business case around the per-attempt figure this workbook produces.
What comes next

Build agentic systems that hold up in production

The next Living Craft cohort for senior engineering leaders and architects starts in October 2026.

The 6-week programme covers exactly this material: agents with bounded failure, defensible cost, and the evaluations that show they hold up. 8 seats, for Staff+ engineers, engineering managers and architects who ship to production.

Apply to the cohort  All resources 

Published 16 September 2026 · free to use, to change and to pass on