v1.108.148 — estimate-vs-actual consumption receipts
plan_turn now prices its recommended route, and the session grades the estimate.
Research on agent token spend keeps finding the same two facts: per-run consumption varies wildly (30x across runs in one recent study), and agents systematically underestimate what a plan will cost to execute. jCodeMunch already held both halves of the answer — plan_turn forecasts the work, and the v1.108.146 advisory budget counts response tokens actually served. This release wires them together.
- plan_turn returns consumption_estimate = {estimated_tokens, expected_calls, basis} — priced at the session's observed mean served-tokens-per-call, or a cold-start default.
- Each plan_turn opens an estimate; the next one closes it against tokens actually served in between. Closed samples feed a median actual/estimated ratio (median, not mean — one runaway turn must not swamp the signal).
- After 3 samples the ratio surfaces everywhere it helps: estimate_calibration in get_session_stats, actual_vs_estimated on the advisory _meta.budget block, and calibrated_tokens back on plan_turn itself.
So a budget advisory now reads: you're at 85% of budget — and your estimates run 2.4x hot. A calibration receipt instead of a bare forecast.
Advisory-only, inline compute, nothing persisted, no new config keys or tools. Full suite: 5409 passed.