Expert · Lesson 17 — Programmatic cost ceiling enforcement
E17Expert
Expert · Lesson 17● live

Programmatic cost ceiling enforcement

Hooks, statusline, and a kill-switch script. The complete stack for enforcing spending ceilings on agentic AI work — not just tracking them.

20 min read · 90 min applyprereq: Operating 04 (hooks) · Expert 03 (token spend)

The difference between tracking and enforcing

TruPath’s out-of-pocket AI spend reached $438.58 by April 13, 2026 — Claude subscriptions $300, OpenRouter $15.37, productive GPU $28.56, wasted GPU $90.66, RunPod $3.99. Anthropic estimated compute on top: $1,040. Total across both: roughly $1,480 in under four months across three ventures.

The $90.66 wasted GPU is the number that matters most. It represents 45% of total GPU spend. Every dollar of it was spent on training runs that produced no committed output — abandoned experiments, exploratory runs, hypothesis tests that didn’t pan out. Each individual run seemed worth trying at the time. The accumulated cost only became visible at month end.

Tracking that waste is useful. Preventing it requires enforcement. Tracking tells you what happened. Enforcement changes what happens next. The enforcement stack — a pre-commitment gate before expensive GPU runs, a model-tier routing rule in CLAUDE.md, a PostToolUse hook that shows current burn, and a Sunday-night kill-switch — converts the ceiling from a monitoring exercise into a structural constraint.

Where spend goes wrong

AI spending has three distinct waste categories, each requiring a different intervention.

Waste categoryMechanismEnforcement lever
Model tier mismatchUsing Opus for tasks Sonnet handles; Sonnet for tasks Haiku handles. Multiplies cost 3-10x for equivalent output.Routing rule in CLAUDE.md; default to Sonnet
Uncommitted GPU runsTraining experiments that produce no committed output. Cost arrives regardless of whether output ships.Pre-commitment gate before runs over threshold
Idle context daysSessions consuming tokens on context management, re-reading files, re-orienting — not productive work.Session restart hygiene; context window monitoring

The TruPath cost structure shows all three: the $300 Claude subscription plus $1,040 estimated compute suggests potential model tier mismatch on high-volume sessions; the $90.66 wasted GPU is pure uncommitted-run waste; and context drift is the invisible category — it doesn’t appear in the invoice but shows up as sessions that take twice as long to produce half the output.

Subscribers only · continued

The rest of Expert · Lesson 17 is for subscribers.

Programmatic cost ceiling enforcement

  • Every Expert-tier lesson — diagnostic prompts, transcripts, prompt kits, full homework
  • Every research paper — methodology, figures, tables, reproducibility appendices
  • New Expert lessons + papers as they ship (quarterly cadence)
  • Foundations + Operating lessons stay free; bundles on GitHub stay free; this tier is the deep stuff

Free while the early catalog ships. Paid tier comes later — subscribe now and you’re grandfathered in.