April 13, 2026 · 9 min read
The Week Our AI Factory Broke because Anthropic changed their billing policy
By Venkatesh Rao · first published on the web
Last week, our autonomous website factory stopped working because Anthropic changed a billing rule.
That sentence is already the whole story in miniature. If you build systems out of AI models, agent loops, prompts, cron jobs, and assorted bits of orchestration glue, you do not just have a software stack. You also have a political economy. There are APIs, pricing tiers, plan semantics, hidden assumptions about what counts as “included,” and quiet product decisions that can instantly become infrastructure events.
In our case, the trigger was simple. Our AI agent framework had been running an autonomous website factory for aikaara.com. It continuously planned improvements, executed one task at a time, built, tested, committed, and deployed. It had been humming along 24/7, shipping around six commits an hour. Then Anthropic changed how third-party apps consume usage. Instead of drawing from plan limits, they now draw from “extra usage” credits. They even added a $200 credit to soften the transition. The exact message was:
“Third-party apps now draw from your extra usage, not your plan limits. We’ve added a $200 credit to get you started.”
Which is a perfectly reasonable sentence until it is the sentence that takes down your factory.
The factory had been running on Claude Opus 4.6 via subscription token. Once the policy change landed, API calls started getting rejected. Not degraded. Not slower. Rejected. The machine that had been quietly shipping website improvements all day suddenly couldn’t think.
The part where everything stops
This happened on April 7 and 8. At first it looked like the usual kind of breakage: some transient API weirdness, maybe a quota issue, maybe a temporary mismatch between what the dashboard said and what the endpoint thought was true. If you run enough systems, you develop a reflexive optimism about these things. Surely it is a small operational annoyance. Surely the thing will come back if you poke it.
It did not come back.
Once it was clear the issue was real, the obvious move was to switch models. So we migrated the planner and executor from Claude Opus 4.6 to OpenAI GPT 5.4. On paper this was plausible. GPT 5.4 is cheaper, capable, and in many contexts more than good enough. In practice, this is where you run into one of the more annoying realities of the current model landscape: two frontier models can both be “good,” and still fail very differently.
Claude Opus 4.6 had been better at taking a dense, multi-step instruction bundle and just doing the thing. GPT 5.4 was workable, but it had a different personality. It was less disciplined about following complex instructions in one shot. It was more likely to improvise. It was also less comfortable with the amount of context we were handing it. This mattered because our factory was not asking a model to solve a toy benchmark problem. It had to read multiple files, absorb codebase documentation, understand task history, and then change the site.
So now we had a factory that was no longer completely dead, but was acting strangely enough to be dangerous. The planner and executor were running, but the behavior had drifted. Tasks that should have been straightforward were getting sloppy
The more interesting bug turned out to be in our own operating assumptions.
While digging into why GPT 5.4 was struggling, we found that the conversation context had bloated to around 300,000 tokens — roughly 94% of a 400,000-token limit. And the cause was not what we first suspected. Our agent orchestration layer was not loading some mysterious extra files. The bloat was coming from long logs from prior debugging sessions being replayed in conversation history.
This is the sort of bug that feels almost insulting once you find it. Nothing is technically “wrong” in the narrow sense. The system is faithfully carrying context forward. It is simply carrying far too much of the wrong context forward. The model was not being dumb. We were effectively forcing it to think while dragging a warehouse of stale logs behind it.
At that point the right move was not incremental tweaking. It was to stop pretending we were one prompt edit away from recovery.
So I manually shut the whole thing down. Disabled the factory daemon. Disabled the planner. Switched the main agent back to Claude Opus 4.6 for direct conversation. Stopped the assembly line and went back to hand tools for a bit.
The rebuild, not the patch
From April 8 to 10, we rebuilt the system from scratch. Not because rewrites are virtuous. Usually they are not. But sometimes the shortest path out of a bad local optimum is to stop preserving the shape of the mistake.
The old version of the factory had grown a bit too organically. There were shell scripts. There were gateway curl hacks. There was too much implicit session state. Too much depended on the system remaining in a “healthy ongoing conversation” with itself. That works right up until the conversation fills with garbage, the model changes, or the economics change.
Factory v4 replaced all of that with native cron jobs in OpenClaw.
The new executor runs every 10 minutes. GPT 5.4 picks exactly one task from the backlog, makes the code change, builds, tests, commits, and pushes. The planner runs every 30 minutes. GPT 5.4 reviews the codebase and generates one to three new tasks. Both run in isolated sessions. Both operate with light context. No daemon loop. No swollen conversational state. No need to preserve a giant thread of “memory” just to keep working.
This changed the economic profile too. We no longer had to burn Claude Opus 4.6 on repetitive factory work. The expensive model could handle direct conversation and the messy, ambiguous human-facing part of the system. GPT 5.4 could handle the structured, bounded code work. That turned out to be the right division of labor. Not because GPT 5.4 magically became Opus, but because we stopped asking it to behave like Opus.
That distinction is important. A lot of teams are still thinking in terms of model substitution: if model A disappears or gets expensive, can model B be made to act the same with enough prompt massaging? Sometimes yes, usually partially, and often at more operational cost than you expect. In our case the winning move was architectural, not rhetorical. We redesigned the work so the cheaper model only had to do tightly scoped, self-contained tasks with clear boundaries.
We also rewrote the planner prompt. The old planner had developed a bad habit familiar to anyone who has let an AI agent loose on a website for too long: content spam. It kept inventing article ideas, FAQ expansions, schema markup tasks, and other things that look productive in a diff but do not necessarily move the business. So the new planner got a governance layer. It now follows a 60/40 rule: at least 60% of tasks must be conversion or UX work, and at most 40% can be content. It also has verification gates: does this actually improve conversion, does it already exist, and is it safe relative to PROJECTS.md?
That sounds like prompt tuning, but it is really portfolio management. If you want autonomous systems to be useful, you cannot just optimize for “keep generating plausible work.” You need the agent to understand what kinds of work count.
In the middle of all this, we found another bug that had been quietly embarrassing us: future-dated blog posts. The factory had been publishing posts dated July 2026 even though it was April. This turned out to be a combination of messy metadata and a bad rendering assumption. We fixed it three ways.
First, we normalized more than 110 article dates across the codebase. Second, we rewired Blog.tsx so the post list is derived from metadata instead of a hardcoded array, and added a future-date filter. Third, we added date enforcement rules to both executor and planner prompts.
This was one of those bugs that looks cosmetic until you notice what it says about system design. If a list should be dynamic, don’t hardcode it. If metadata exists, derive from the metadata. And if dates matter even a little bit, validate them. Otherwise your autonomous system will eventually time-travel, and not in a charming way.
What the new system actually did
The rebuild worked better than I expected, frankly. Factory v4 ran for 48 hours and completed 253 executor runs with a 99% success rate, producing 48 successful task completions in that window. Across the backlog, 101 tasks were completed. The system pushed 78 factory commits to production.
More importantly, it behaved sanely at the edges. The planner recognized when the queue was full and stopped adding work. When everything was done, it reported BACKLOG_EMPTY and waited.
That may not sound glamorous, but one of the hardest things to get autonomous agents to do is nothing. They are often much better at manufacturing busywork than at stopping when appropriate.
Watching the planner correctly decline to invent more tasks was oddly reassuring. It suggested we had gone from “restless intern” to something closer to “junior operator with basic judgment.”
What I learned from this mess
First, platform dependency is not an abstract strategic concern. It is an operational one. If a single vendor policy change can interrupt your ability to execute, then that vendor is part of your runtime, whether you admit it or not. We tend to think about model providers as interchangeable compute utilities. They are not. They are moving platforms with changing economics, evolving product boundaries, and occasionally surprising definitions of what your existing plan actually means.
Second, model differences matter in production in ways benchmark culture still does a poor job of capturing. Claude Opus 4.6 was better for us at following complex instructions exactly. GPT 5.4 was cheaper and good enough for bounded, structured tasks. Those are not minor stylistic differences. They determine what system shapes are viable. A model that is slightly more improvisational might be fine for brainstorming and quietly terrible for agentic execution unless you tighten the loop around it.
Third, long context is not the same thing as useful context. The 300,000-token bloat episode was a reminder that systems do not just fail because they lack information. They also fail because they preserve too much irrelevant information. Debug logs are not memory. They are often just sediment. If you keep replaying them into the model, eventually the model starts operating like a person forced to make decisions while reading every old Slack thread first.
Fourth, cron-based execution beats daemon loops for this class of work. Cron jobs are boring, and boring is good. They survive restarts. They minimize hidden session state. They force you to define each run as a fresh transaction with explicit inputs and outputs. For autonomous systems, that is often the right default. If your agent needs a rich, continuous inner life in order to reliably update a website, you may have accidentally built a very expensive source of entropy.
And finally: always validate dates, always derive from a source of truth, and never hardcode a list that should be dynamic. This lesson is almost embarrassingly old-school, which is part of why it is worth repeating. AI systems do not exempt you from software engineering fundamentals. They mostly create new and inventive ways to relearn them.
Closing thought
I think the biggest conceptual shift for me last week was this: resilience in AI systems is not mainly about getting the smartest model. It is about reducing the amount of intelligence any one step requires.
When the factory broke, the first instinct was to restore the previous magic - to make GPT 5.4 behave like Claude Opus 4.6, to recover the exact old flow, to patch the break until the machine felt familiar again. That was the wrong instinct. The real fix was to redesign the factory so that no single run required a heroic model performance, a giant context window, or a delicate long-lived session. Smaller tasks. Cleaner boundaries. Fresh sessions. Better incentives.
That is probably the more general pattern for building with AI right now. Assume upstream policies will change. Assume models will differ in ways that matter. Assume context can rot. Assume any hidden state you rely on will eventually betray you. Then build a system that can keep shipping anyway.
It is less magical than the demos. But it is a lot closer to engineering.