Reading the Claude apps gateway Announcement, I Rebuilt My Indie-Scale Control Plane
The self-hosted Claude apps gateway is a control-plane/data-plane separation you can scale down. Per-app cost attribution, model allowlists, and fail-closed spend caps, implemented as a small Cloudflare Workers proxy.
Keep the Extra Capacity Out of Your Baseline — Burning Backlog During the Time-Boxed +50% Weekly Limit
Claude Code's weekly limits are raised 50% until July 13. A design for spending the temporary headroom only on finite backlog work: an expiry-aware burst queue, a dual-lane ledger, and a single ratio that tells you whether your baseline quietly grew.
A Fail-Closed Model Pricing Registry So New Models Don't Quietly Break Your Cost Math
When Opus 4.8 and Haiku 4.5 landed in the Messages API, rates scattered across my code silently skewed the cost rollup. Here is how to centralize per-model rates and fail closed on unknown models, with complete working code.
When Your Claude API Cost Math Doesn't Match the Bill: Accounting for the Four Token Buckets
Turn on prompt caching and your homegrown cost tally drifts from the console bill. Here is how to weight the four token buckets the usage object returns and build a ledger you can reconcile.
The Day a Billing Change Got Reversed at the Last Minute — Designing a Reversible Pipeline So You Don't Rewrite in a Panic
A billing change due to take effect on June 15 was retracted at the eleventh hour. From the position of someone who had literally logged 'effective today' the night before, here is why I didn't have to scramble to rewrite my headless stages, and how to build a pipeline that survives reversals and delays — with working code.
When an Announced Billing Change Is Withdrawn at the Last Minute, Change No Code
A billing change that was supposed to take effect was withdrawn on the day. To survive announce, apply, and revert without touching code, I keep platform behavior behind a single flag and project the monthly delta from real logs.
Two Days Into the Billing Change: How Far My Headless Costs Drifted From the Estimate
On June 15 the billing change moved headless execution onto separate monthly credits. Two days in, I broke down cost per pipeline stage and found one stage running at roughly double my estimate. Here is how I measured it, and why I moved one stage back to my subscription.
Record Which Model Actually Answered — Attestation Logging for Headless Pipelines
Persist the model field and usage from every API response so you can detect when the served model differs from the one you requested, and reconcile per-model cost ahead of the usage credits change.
Designing a Claude API Monthly Budget That Doesn't Blow Up — Cost Management for Solo Developers
When you embed Claude API into a side-project app, the first thing you hit is the end-of-month invoice. Here are the budgeting frameworks, monitoring patterns, and implementation tricks I use to keep costs predictable — drawn from running my own apps.
Giving Claude Agents Long-Term Memory in Production — Seven Pitfalls and the Patterns That Fix Them
A production playbook for Claude agents with long-term memory — seven pitfalls that break memory agents live, and the design patterns that fix each one.
Claude API Usage & Cost API: Programmatic Cost Monitoring and Optimization
Learn how to use Anthropic's Usage & Cost Admin API to programmatically monitor, analyze, and optimize your Claude API spending with practical code examples.