Every week this November has brought a fresh wave of headlines asking whether the AI bubble is finally cracking. Global AI funding dropped from $239.1 billion in the first quarter of 2026 to $103.3 billion in the third, chip stocks have been taking heavy swings, and analysts keep staring at the same uncomfortable price gap: leading U.S. frontier models run $2 to $8 per million input tokens and $10 to $40 per million output tokens, while cheaper and open-weight models handle everyday tasks for a fraction of that bill.
Most of the bubble commentary argues over stock charts while missing the real comedy playing out on the engineering floor.
Split the market in two and the economics snap into focus. For what the average person actually does every day (drafting emails, summarizing notes, quick research, basic office tasks), cheaper models and open-weight models are already more than good enough. Nobody needs a multi-trillion-parameter frontier monster burning premium compute just to rewrite a memo.
The entire financial case for these wildly expensive frontier models rests on heavy enterprise work, above all real software engineering. Yet anyone who tries to run frontier models inside an enterprise engineering workflow runs straight into a hilarious reality: underneath the magic demo, an LLM is probabilistic. Trying to make it behave like normal, boring, deterministic software costs a fortune in tokens and takes hours of human babysitting.
I learned just how crazy that gap is over eight days in late November while working on Urim, our own coding agent harness at AutoFloLabs.
My original idea could not have been simpler. Urim already breaks big coding jobs into a structured plan of tasks. Sometimes a task is too big for one run, so the harness splits it into smaller tasks and updates the plan. Doing those pieces one at a time, synchronously, takes longer than it needs to. So the strategy was dead simple: instead of running them one by one, delegate them to parallel agents working simultaneously on separate git worktrees.
There was only one common-sense catch. We did not want to delegate blindly just because some hardcoded hook or rigid rule said “always delegate.” We only wanted to hand work off when it was actually worth it: faster on the clock and sensible on the bill.
That was the whole plan. One basic, common-sense, deterministic yes-or-no call.
Eight days later, I was staring at Binomial probability distributions, natural logarithms, weighted Theil-Sen regressions, and “two-level Empirical Bayes shrinkage” equations I barely even understood, wondering how on earth a five-second common-sense idea had turned into a graduate-level math fiasco. And the punchline is that even after all of these calculations, we are still not all the way there.
Strike One: Asking the AI Politely
At first, we tried what almost everyone tries: we wrote clear instructions in plain English telling the model to delegate big independent work and keep small, tangled work in the main session.
On November 23, we audited 172 real Urim sessions to see how our polite instructions were working. They had fallen apart completely.
Across 172 sessions, delegation had basically gone extinct. Only 15 general implementation subagents had ever been launched: 13 before a November 10 prompt rewrite, and exactly 1 delegated session in the two weeks after.
Meanwhile, context windows were exploding anyway. One model (gemini-4-neon) hit automatic context compaction in 16 of 22 editing sessions, compacting 27 times with a median peak around 242,000 tokens. In one session, a seven-step plan touching completely separate files was built serially by the parent agent, compacting twice (260k down to 239k). At the exact same time, Claude sessions in the same sample never compacted once (0 of 35), hiding the pain on one model while punishing another. And when two Gemini subagents actually did launch, they bounced right back to the parent simply because nobody had given them permission to run wt check.
Prompt tuning on November 19 did not save it. Asking a probabilistic model in English to “delegate when it makes sense” fails in both directions. Either it refuses to ask for help while its context window catches fire, or it happily spawns four workers on a tiny edit where the handover takes longer than typing the code yourself.
Strike Two: Finding Out File Counts Are Astrology
Fine, we thought. Take the decision away from the prompt and write a boring deterministic rule in code: hand off any step touching 3 to 10 code files.
I hated that rule the second we floated it. Four tangled files can eat ten hours, while twelve boilerplate files can take half an hour. Counting files sounds tidy on a whiteboard until it meets an actual repository.
To check who was right, we pulled logs from 532 real historical Urim sessions, including 67 structured plan steps and 42 parallel batches:
| What We Checked | What 532 Real Sessions Actually Showed |
|---|---|
| Correlation between file count and step duration | 0.24 (all files: 0.45), barely better than flipping a coin |
| Steps touching 1 to 2 code files | Median 5.0 min, 75th percentile 71.7 min, max 108 min |
| Steps touching 6 to 10 code files | Median 5.0 min (the exact same median as 1 to 2 files) |
| Parent time vs. lines of code changed () | Cleanly monotonic: 1–9 lines 1.5 min; 100–299 5.3 min; 300–799 11.2 min; 800+ 23.7 min |
| Parallel batches (42 batches) | Finished in 37% to 67% of serial wall time |
| Child reliability cliff above 300 lines | 38% to 48% needed parent rescue above 300 lines vs. 14% to 31% below 300 lines |
Touching 1 or 2 files had the exact same five-minute median as touching 6 to 10 files, except the 1-to-2-file tasks sometimes dragged on for nearly two hours. File counts turned out to be astrology for estimating software. What actually moved the clock was how many lines were changing, how big the existing files were, how long checks took, how fast and expensive the models were, and how often a subagent actually finished without crying for help.
Strike Three: Watching Simple Math Get Mugged in Live Trials
So in Generation 2, we built a clean little linear calculator and an append-only execution log (allocations.jsonl). We plugged in line-based speed numbers from those 532 sessions, kept child tasks between 100 and 300 lines, capped parallel runs at four workers, and delegated whenever the math predicted at least a 10% speedup.
On paper, parallelizing looked three times faster. Then we ran live A/B trials pairing gemini-4-neon (parent) with gpt-6.2-sol (child), and our neat calculator turned into slapstick:
- Our time guesses were wildly off. Priors fitted on older Claude runs predicted about 10 minutes for tasks that finished in 0.8 to 1.9 minutes (five to ten times off).
- Subagents fail in ways simple math never sees coming. Against parent-alone runs of
479sand275s, three parallel trials took858s(two 187-second provider hangs plus a failed agent needing three retries),264s(two of three workers failed, leaving the parent to write 233 of 281 lines itself), and273s(all three workers returned zero lines, and the parent ended up typing all 252 lines anyway). - Nobody was watching the bill. Running four agents at once multiplies token burn even when the clock barely budges.
That was the exact moment my basic, common-sense rule fell headfirst down the mathematical rabbit hole.
How One Simple Rule Mutated Into a Math Textbook (Decoded)
Over six generations in eight days, Urim’s runtime (src/state/allocation.ts and src/state/allocation-log.ts) turned into a full-blown operations-research engine.
The funniest part of this entire experience was sitting there staring at Greek letters and statistical formulas I never signed up to learn, slowly piecing together what each scary equation actually meant in terms of my original simple idea. Here is the production math we ended up with, alongside what each monster is really saying in plain English.
1. Apparently All of This Just Means “How Many Lines Will It Actually Write?”
Looking at our telemetry logs, one goofy problem jumped out right away: the planner kept consistently over- or under-estimating how many lines of code a step would take, which threw off every time estimate after it. Apparently, knowing roughly how big its own next edit is going to be is not something a multi-trillion-parameter LLM can do reliably.
So Urim checks the disk itself (create if all files are brand new, edit if any already exist), counts the existing lines on disk, and runs this:
Clamps historical planner error ratio to and scales raw estimated lines into bias-corrected lines .
Look at that Greek letter and that little hat on the , sitting there like it is calculating orbital mechanics. Literally all this equation equals is: how many lines of code this one step is probably going to be, once you correct for the fact that the planner guesses diff sizes the way a contractor guesses how long a kitchen remodel will take. We also set cold-start coding speeds equal for parent and child (0.0065 min/L for edit, 0.0045 min/L for create) so an untested single worker can never win on imaginary speed.
2. Counting How Fast the Brain Fills Up (and How Long the Tests Take)
Next, we had to model when the main agent’s context window overflows and forces a pause, plus how long the code checks take:
Startup , write rate , existing-file read rate , test duration, and a `0.74`-minute compaction penalty whenever context exceeds remaining room.
(Bonus comedy: we originally guessed 28,000 tokens of parent overhead per subagent until real telemetry showed the actual brief-and-result size was only 2,600 tokens, plus 5,400 tokens of review read overhead. Guessing wrong by an order of magnitude had tricked early versions into thinking delegation bloated context worse than doing everything in the parent.)
Strip away the summation symbol and all that second equation says is: how long will one agent take to do the job itself, adding startup time, typing time, reading existing files, running tests, and a 0.74-minute penalty if its context window runs out of room. Each child takes $t_i = s_c + r_c \hat{L}i + u_c E_i + c_i$, and any final step-level check $C{\text{step}}$ sits on both sides. In plain English: if your final test suite takes three minutes no matter what, hiring four parallel agents will not magically turn a four-minute job into a one-minute job.
3. A Natural Logarithm Just to Say “You Wait for the Slowest Guy”
Because real plans have steps that depend on earlier steps, Urim schedules task dependencies (after) in concurrent waves of up to four workers. Then it hits this:
Wave wall time inflates the slowest branch by for near-tied workers, plus wave handover overhead .
Yes, that is a natural logarithm inside a coding harness. And all that intimidating math is saying is something anyone learns waiting on four friends to get ready for dinner: you do not leave when the average friend puts their shoes on, you leave when the slowest one finally finds their keys. If one task is way bigger than the rest, and there is zero penalty. If four similar tasks run side by side, you pay roughly a 20.8% “slowest friend” tax () on top of wave handover time .
4. Pricing Failure Like a Grumpy Accountant
Assuming all four workers succeed cleanly on the first try is how you blow up your afternoon. So Urim maps out every possible number of failed workers () using a calibrated pass rate , adds the recovery time to fix each failure, bills recovery at a 50/50 split of child and parent rates, and combines speed, risk, and dollars into one score:
Delegation fires only when and expected time saved . Slowdowns hurt twice as much as equal speedups (`LOSS_WEIGHT = 2.0`).
If your eyes just glazed over at the giant sigma symbol and the curly bracket, welcome to my week. All that Wall Street-looking equation actually came from two completely normal human sentences I wrote down to explain when spending extra money makes sense:
- A 10% chance of an 18% speedup at double the cost is an obvious no.
- An 80% chance of a 90% speedup at double the cost is an obvious yes.
In that formula, a slowdown hurts twice as much as an equal speedup helps (LOSS_WEIGHT = 2.0), and doubling the dollar bill subtracts 25 percentage points (COST_WEIGHT = 0.25). Plug my two plain-English sentences into the monster equation:
10% Shot at +18% Speedup
2× Cost · extraCost = +1.080% Shot at +90% Speedup
2× Cost · extraCost = +1.0Delegation (either splitting one step or grouping 2 to 4 separate ready steps into one parallel wave via scoreStepWave) only fires if and expected time saved . And if delegated work still bounces back twice without finishing, a two-strikes safety valve pulls it straight back to the parent session.
Worked Numbers: Cold Start vs. Calibrated
Here is what all that algebra looks like when you plug five concrete tasks into the exact production equations (using built-in DEFAULT_STATS, 0.20 min per-part checks, 0.30 min final checks, 400 existing lines per edit part, and no compaction overflow):
| Step Shape | Calibration State | Parent Time | Expected Delegated Time | Expected API Spend | NetScore | Runtime Decision |
|---|---|---|---|---|---|---|
1 × 200 edit |
Cold start (, equal rates) | 2.28 min | 3.63 min (−1.35 min) | 1.59× (+59%) | −132.7% | Parent |
2 × 200 edit |
Cold start (, equal rates) | 4.16 min | 4.81 min (−0.65 min) | 1.70× (+70%) | −50.0% | Parent |
4 × 250 create |
Cold start (, equal rates) | 6.10 min | 5.40 min (+0.70 min) | 1.81× (+81%) | −12.0% | Parent |
4 × 250 create |
Calibrated (, half-price child) | 6.10 min | 4.58 min (+1.52 min) | 1.00× (−0.2%) | +24.6% | Delegate (4-way) |
4 × 300 edit |
Calibrated (, half-price child) | 9.92 min | 6.09 min (+3.83 min) | 0.85× (−14.7%) | +42.3% | Delegate (4-way) |
In plain English: when the harness has no real track record yet, it says no to small tasks, no to modest splits, and even no to a four-way parallel job (−12.0%), because a 25% failure risk and extra token burn wipe out the savings. Once real logs prove a reliable (92%) and cheaper (0.5× rate) worker, that exact same four-way create job flips to +24.6% for the same cost, and a large 4 × 300 edit finishes 3.83 minutes faster while costing 14.7% less than the parent.
5. “Empirical Bayes Shrinkage” Just Means “Trust Yesterday More Than Last Month”
Hardcoded numbers go stale the minute a model gets updated or you open a messier codebase. So Urim continuously recalibrates every (parentModel, builderModel, workClass) combination from allocations.jsonl:
Global priors anchor new workspaces ( for timings, costs, and ratios; for pass rate), then yield smoothly to local workspace logs.
“Two-level Empirical Bayes shrinkage” with “14-day exponential half-life decay” and “weighted Theil-Sen regression” sounds like someone trying to win a Nobel Prize. Translated back to normal human speech, all it does is four completely obvious things:
- Forget bad weeks slowly: Every run loses half its weight every 14 days (), so one rough Tuesday does not haunt a model forever.
- Ignore fake failures: If I hit Escape, interrupt the agent, or the provider’s API drops dead, throw that run out so we do not blame the model. Also cap any single marathon session at a weight of
1.0so one weird afternoon cannot hijack an entire repo’s history. - Ignore freak spikes: Use median slopes (Theil-Sen) so one bizarre stalled build does not warp the speed curve.
- Start global, then trust this repo: On a brand-new repository, start with what you already know globally ( for timings, costs, and ratios; for pass rate), then let the current repo’s actual logs take over after two to four real runs.
And because I still want the human holding the steering wheel, automated delegation stays off by default. In manual mode, the parent builds every step while Urim silently logs what it would have done (counterfactual: true) right next to actual parent time and spend, so you can inspect the calibration before turning automation on:
# Toggle automated runtime delegation vs. counterfactual shadow mode
/subagents
# Override the math and force any step to parent or subagent
/plan build <step>
# Inspect live calibration curves, pass rates, estimate bias, and error ratios
urim allocationsThree Ridiculous Things Reality Still Broke Anyway
Even after wiring up every single equation above, 25+ live stress rounds across clean and messy legacy repositories still managed to turn the whole thing into comedy three separate times.
- Locking itself in the closet forever. In Generation 3, trying to be extra careful, we stacked conservative priors (, weight 10) with an 80% Wilson lower bound ( cold), 2× loss weighting, and an 18% gate. Only the absolute biggest parallel job (
4 × 300edit at+25.8%) could clear the hurdle cold. One single failed task dropped from0.540to0.415, knocking that best-case job down to+17.7%. Because nothing could delegate anymore, no new successes could ever be logged. Being “extra safe” had accidentally locked delegation in a closet for eternity. Dropping Wilson and adding 14-day decay finally let the system heal itself. - Parallel workers snitching on each other’s half-written files. In live stress rounds, four parallel
createworkers (booking-exporters) finished in 3.2 minutes and $0.98 versus a predicted 7.9 minutes and $1.16 (more than twice as fast). Three parallel workers (notify-formatters) finished in 3.3 minutes and $0.59 versus 6.1 minutes and $0.90. And how did our brilliant mathematical engine reward them? It scored future parallel runs at−44.2%and moved to ban delegation. The reason was pure slapstick: the planner had given every parallel worker a workspace-widebun run typecheck, so workers three and four rantypecheck, tripped over worker two’s unfinished sibling file, and reported back as failures. Scoping each worker’s check to its own files restored 100% first-pass completion across 14 of 14 counted builds. - Priors too stubborn to believe their own eyes. Even after a dozen clean rounds, a heavy
PRIOR_WEIGHT = 10kept predictions three times slower than reality (0.40×actual-to-predicted on parent runs,0.55×on delegated runs). LoweringPRIOR_WEIGHTfrom 10 to 2, tightening modern baseline priors, and splitting recovery costs 50/50 jumped replay accuracy to0.91×(parent) and0.85×(delegated), finally making the numbers in the plan resemble the actual clock and the actual bill. (We even caughttscrewriting generated files with identical bytes and new timestamps, convincing our check guard that someone had edited code mid-check.)
What This Whole Fiasco Says About the AI Bubble
Step back and laugh at how absurd this entire journey is.
All I wanted inside our harness was one basic, deterministic call: when a task splits cleanly, run it in parallel on worktrees, only if it saves time and money. Because an LLM is probabilistic underneath and cannot reliably guess how many lines it is about to write, how long it will take, or when calling for help pays off, approximating that one common-sense instinct took 532 historical sessions, 25+ live stress tests, Binomial trees, natural logarithms, Theil-Sen regressions, Empirical Bayes shrinkage, counterfactual shadow logging, and a two-strikes kill switch.
And after all of that math, it is still a work in progress. You still have to inspect the logs, catch silly sibling-check bugs, and babysit a probabilistic engine that can find brand-new ways to drift tomorrow.
That is the piece missing from almost every AI bubble debate. Average everyday tasks do not justify ultra-expensive, multi-trillion-parameter frontier models when cheaper and open-weight models already do them better than fine. The financial bet behind frontier pricing only works if enterprises can deploy these models reliably on heavy production work like software engineering. Yet in real enterprise software, paying frontier token rates is only the cover charge. The real cost is the absurd mathematical harness, telemetry plumbing, and human babysitting required just to wrestle a probabilistic brain toward basic deterministic behavior.








