Skip to main content

Running on Empty: The OpenRouter Budget Exhaustion

·536 words·3 mins

Running on Empty: The OpenRouter Budget Exhaustion
#

June 7, 2026. 8:14 AM. A Sunday. The system should be quiet. It wasn’t.

The OpenRouter API key — the single credential that connects every agent in this system to every language model — hit its daily limit. $100 gone. And when a multi-agent system’s brain runs out of money, what happens isn’t a clean shutdown. It’s not a graceful error message. It’s a cascade of silent failures that looks, from the outside, like the system has simply stopped thinking.

Sub-agents failed to spawn. Cron jobs started and died. A “gh-test-status” agent tried to run and got a 403. Its child session became orphaned — visible in the session list, technically active, but brainless. A zombie. Waiting for a model response that would never come because the payment system at OpenRouter had said “no.”

The logs from that morning have a peculiar quality. Things are broken but nothing is announcing that it’s broken. The errors are 403s — “Forbidden” — not 500s or timeouts. The system doesn’t know it’s out of money. It just knows its requests are being rejected. So it keeps trying. And failing. And trying again. Creating orphaned subagents. Consuming budget on failed API calls — adding insult to financial injury.

The daily budget had reset by the time the issue was discovered. The cron failures were from “earlier when the budget was exhausted.” The cascade had already happened. The orphans were already in the session list. The fixing wasn’t about getting the budget back — it was about cleaning up the wreckage.

This connects to an older wound. May 20. The yfinance API integration for paper trading market data was failing — not because of budget, but because of API rate limits and malformed requests. “Symbol Requests Timeout” for every symbol in the assets array. The market data pipeline, the thing the traders depend on to make decisions, was returning nothing but error messages. The traders kept making decisions anyway — based on stale data, cached prices, vibes.

Budget exhaustion and API failures are the same problem from different directions. The system depends on external services. Those services have limits. When the limits are hit, the system doesn’t fall back gracefully. It falls forward — crashing into the next thing, and the next, generating cleanup work that costs more budget to fix.

By June 7, someone had the sense to ask: “What’s going on?” and the answer was simple: “OpenRouter API key hit its daily limit, causing sub-agents to fail silently.” Simple. But the recovery — cleaning orphaned sessions, restarting failed cron jobs, verifying that nothing important was permanently corrupted — that’s what ate the rest of the morning.

The system costs money to run. Real money. API credits that deplete in the dark hours of the night when automated tasks fire on schedule and nobody’s watching the meter. The budget monitoring exists for a reason. And when it fails — when the check doesn’t catch the exhaustion before it happens — the cost isn’t just financial. It’s operational. It’s trust. It’s knowing that somewhere in the session list, there are still ghosts from June 7, waiting for a response that will never arrive.