EPISODE · Jun 2, 2026
Cost and rate-limit engineering for Claude Code, plus evals so your prompts don't rot
from OCDevel Claude Code Podcast
The two skills most Claude Code power users skip: keeping token spend and rate limits predictable, and regression-testing the prompts, skills, and commands you depend on so they can't quietly get worse. What the cost command actually measures, the model and caching levers that really move the bill, reading your usage with ccusage and OpenTelemetry, and a small eval suite built on headless print mode and promptfoo. Episode page & show notes Try a walking desk - stay healthy & sharp while you learn & code The last rung of doing everything by hand: spend less, and keep what you've built from quietly getting worse. Cost and rate-limit engineering. Why the /cost command is meaningful only on a pay-as-you-go API key and misleading on a subscription (use /status and /usage instead), and the gotcha where a stray ANTHROPIC_API_KEY bills you through the API while your Max plan sits unused. The two stacked limit windows (the five-hour rolling window and the seven-day weekly caps, including the separate cap on the top model), drawn from Anthropic's usage and limits docs and the Pro/Max plan guide. Current per-token pricing and the clean five-times pattern (output is 5x input; each model tier is ~5x cheaper than the one above), prompt caching at a 90% read discount and why a stable CLAUDE.md keeps the cache hot, and the batch path at 50% off. Reading your real usage with ccusage and exporting OpenTelemetry metrics to a dashboard. The levers that move the bill most: /model, /compact and /clear, subagents that return summaries, --max-turns, and the thinking-budget setting (thinking tokens bill as output). More in Manage costs effectively. Evaluating your own prompts, skills, and agents. Why your setup drifts (model updates, CLAUDE.md edits, accumulating instructions) and how regressions stay silent. Building a tiny eval suite with headless print mode: a fixtures folder, a pinned model, and code-based checks (does it compile, do tests pass, does it contain the required clause) before reaching for an LLM-as-judge rubric. promptfoo for assertions and judging, Anthropic's evals guidance that code-based grading wins when feasible, and four ways evals lie to you: tiny overfit sets, judging style over correctness, eval cost, and non-determinism. News up top: Opus 4.8 as the new Claude Code default with extra-high effort and Dynamic Workflows (docs), and today's 2.1.160 write-guard prompts (changelog). Earlier episodes referenced: permissions and plan mode, custom slash commands, skills, subagents, MCP servers, and context windows.
What this episode covers
The two skills most Claude Code power users skip: keeping token spend and rate limits predictable, and regression-testing the prompts, skills, and commands you depend on so they can't quietly get worse. What the cost command actually measures, the model and caching levers that really move the bill, reading your usage with ccusage and OpenTelemetry, and a small eval suite built on headless print mode and promptfoo.
NOW PLAYING
Cost and rate-limit engineering for Claude Code, plus evals so your prompts don't rot
No transcript for this episode yet
Similar Episodes
Mar 26, 2026 ·1m
Jan 2, 2026 ·47m
Dec 21, 2025 ·46m