Skip to content
Free tool

Recursion Budget & Cost Simulator

A self-improving agent harness — like Google Cloud AI Research's Harness² (arXiv:2610.14224) — spends tokens on meta-optimization: improving its own prompts and tools, not just running the task. Set the recursion structure — depth, branching, verifier passes, iterations — and a base-task and meta-call token profile, and the tool projects total tokens, total cost, wall-clock, and the all-important split between base-task and meta spend. It ships no vendor prices: you type your own model's rate, so the estimate is yours and never stale. Everything runs in your browser through one visible formula — a HEURISTIC design aid, not a benchmark.

Start from a preset (structure only — your prices are kept)

A self-improving harness that optimizes its own scaffolding several meta-levels deep, proposing several candidates per iteration and verifying each more than once. This is where the multiplicative blow-up begins.

Recursion structure

A self-improving harness spends tokens optimizing its own prompts and tools. These four knobs decide how much. The fan-out below is iterations × branching × verifier, and it compounds once per meta-level.

Recursion depth (meta-levels)

0 = run the task once, no self-improvement. Each extra level optimizes the layer below it — the multiplicative term.

3
Branching factor (candidates / iteration)

How many candidate improvements are proposed in each optimization step.

3
Verifier passes / candidate

How many times each candidate is evaluated (each pass re-runs the layer below to judge it).

2
Optimization iterations / level

How many improvement rounds are run at each meta-level.

3

Fan-out per level = 3 × 3 × 2 = 18 → base-task runs = 18^3 = 5,832

Token profile per call

The base task is the work you actually want done. Meta calls are the proposals and verifier/judge calls the harness makes to improve itself.

Economics

The prices below are an example, edit me — this tool ships no vendor price list and never auto-fills a model's rate. Type your own model's $/1M tokens so the estimate is yours, not a stale quote.

The model, in full

heuristic
fanout     = iterations × branching × verifier
           = 3 × 3 × 2 = 18
baseRuns   = depth ≥ 1 ? fanout^depth : 1
           = 5,832  (1 delivered + 5,831 trials)
metaCalls  = Σ[d=1..depth] fanout^(depth−d)
             × iterations × branching × (1 + verifier)
           = 9,261
tokens     = baseRuns·(baseIn+baseOut)
             + metaCalls·(metaIn+metaOut)
cost       = tokensIn/1e6·priceIn + tokensOut/1e6·priceOut
wallclock  = totalCalls × latency   (sequential)

Every number above is derived from your inputs through this one formula — there is no hidden benchmark, no fitted curve and no priced model. It is a design heuristic to make the blow-up visible, not a guarantee of any real system's spend.

Estimate

your prices
Total cost
$369
over $100 cap
Model calls
15,093
5,832 base · 9,261 meta
Total tokens
65.52M
51.11M in · 14.41M out
Wall-clock
33.5 h
sequential; parallel branches cut this

Base task vs meta-optimization

Base task 0% · $0.03Meta 100% · $369

Meta-optimization dominates: 100% of the spend goes to improving the harness, not to the task it was built for. This is the self-improving-agent cost trap.

Budget cap

Cap$100
Blows the cap at depth3
Marginal cost of +1 level$6,281
0
1
2
3
4
5
6
7
8
9
10

Cost by recursion depth (other inputs held). Red = over the $100 cap; orange = your current depth.

Where the tokens go, per recursion level

The base task sits at the bottom. Each meta-optimization level stacks above it, and because the fan-out compounds once per level, the upper levels (and the base-task re-runs they trigger) are where the spend concentrates.

Meta-optimization · level 3$0.5671 node(s) · 27 calls · 102,600 tokMeta-optimization · level 2$10.2118 node(s) · 486 calls · 1.85M tokMeta-optimization · level 1$184324 node(s) · 8,748 calls · 33.24M tokBase-task executions (1 real + trials)$1755,832 run(s) · 5,832 calls · 30.33M tok
TL;DR

What this tool is

  • A free, fully in-browser simulator for the cost and latency of a self-improving / recursive agent harness — the kind that spends tokens on META-optimization (improving its own prompts and tools) on top of the base task. Nothing is uploaded; there are no server calls.
  • You set the recursion structure (depth, branching factor, verifier passes, optimization iterations) and the token profile of a base-task call and a meta call. The tool projects total tokens, total cost, wall-clock, and the split between base-task and meta-optimization spend.
  • It ships NO vendor price list. You type your own model’s $/1M input and output tokens and your per-call latency, so the estimate is always yours and never goes stale. The example prices shown are clearly labelled "example, edit me".
  • The headline insight is multiplicative: fan-out = iterations × branching × verifier compounds once per meta-level, so deep self-improvement can spend far more on improving the harness than on the task it was built to do.
  • A budget-cap input shows the depth at which you blow the cap and the marginal cost of one more level. Share any scenario by permalink (base64url URL hash) or export it as Markdown. Every number comes from one visible formula — it is a HEURISTIC design aid, not a benchmark or a vendor quote.

Meta-optimization is where the money goes

The appeal of a recursive, self-improving harness is obvious: let the agent rewrite its own prompts, pick its own tools and keep the lessons that worked. The cost of it is less obvious, because it is multiplicative, not additive. Every meta-level proposes several candidate improvements, evaluates each one by re-running the task underneath it, and does that for a number of iterations — so the fan-out, iterations × branching × verifier, compounds once per level. Three modest levels can already mean thousands of base-task executions, and the tokens spent improving the harness dwarf the tokens spent on the answer you actually wanted.

That is the number this tool exists to show you before you build. It deliberately contains no vendor price list — you supply your own model's cost per million tokens and your own per-call latency, and the page prints the full formula it runs them through. Set a budget cap and it tells you the exact depth at which the recursion blows it, and the marginal cost of adding one more level. The point is not a precise forecast; it is the order of magnitude and the base-vs-meta split, so a decision to go recursive is made with the cost blow-up in plain sight rather than discovered on the invoice.

Frequently asked questions

What does this simulator actually model?

It models the token spend of a recursive, self-improving agent harness. On top of the base task, such a harness optimizes its own prompts and tools: at each meta-level it runs a number of optimization iterations, each proposing a branching factor of candidate improvements, each candidate evaluated by some number of verifier passes. The fan-out per level is iterations × branching × verifier, and it compounds once per meta-level, so base-task executions scale as fan-out^depth. The tool turns your inputs into total tokens, total cost at your prices, wall-clock at your latency, and the split between base-task and meta-optimization spend.

Why does the tool not include model prices?

On purpose. Vendor prices change often and vary by model, region and contract, so any baked-in price list would be stale or wrong for someone. Instead you type your own model’s dollars per million input and output tokens. The example figures shown on load are clearly labelled "example, edit me" and are not a recommendation or a vendor list. Because the arithmetic runs entirely on the numbers you supply, through a formula the page shows in full, the estimate can never be out of date — it is exactly as accurate as the inputs you give it.

Is this a benchmark or a prediction of what a real system costs?

Neither. It is a transparent heuristic design aid. It makes a simple, visible assumption — every base-task, proposal and verifier call consumes the token profile you set — and projects it through the recursion structure you choose. Real harnesses cache, prune losing branches, route to cheaper models and parallelise, all of which change the real figure. Use this before you build to see the shape and the order of magnitude of the blow-up, and to find where a budget cap bites, not as a guarantee of any production spend.

What is the point of the base-task vs meta-optimization split?

It is the core lesson. The base task is the work you actually want done — one productive run is what you would pay with no recursion at all. Everything the recursion adds, the repeated base-task trial runs plus the proposal and verifier calls, is meta-optimization: spend on improving the harness rather than on the answer. For a self-improving agent (the Harness² idea from Google Cloud AI Research, arXiv:2610.14224), that meta spend can easily exceed the base task by orders of magnitude, which is exactly the trap this tool is built to surface before it costs you real money.

Does anything leave my browser?

No. The whole tool is client-side React with inline SVG and pure functions. There are no network or API calls, no account, and nothing you enter is sent anywhere. The shareable permalink encodes your scenario into the URL hash in your own browser, and the Markdown export is generated and downloaded locally as a Blob.

🎉 New here? Use code WELCOME10 for 10% off any plan at checkout
Recursion Budget & Cost Simulator — Self-Improving Agent Spend · PlayCISO