Tracing the gas trail back to the genesis block: On August 26, 2025, OpenAI Codex silently devoured usage limits across thousands of paid sessions. The anomaly wasn't a reentrancy or a flash loan attack—it was a failure in the protocol's resource accounting. The system's invariant—predictable token consumption per interaction—had been violated. And the root cause lies in two engineering subsystems: context compression and caching. Both are software-level flaws, not hardware bottlenecks. But for a system that bills by the token, these flaws are existential.
Context: The Codex Resource Model
Codex operates on a per-user token limit, replenished monthly. Each request consumes a variable number of tokens based on input length, output length, and internal processing like image compression and automatic title generation. The system promises a deterministic cost model: users pay a flat subscription fee in exchange for a capped number of tokens. When the cap is exhausted, the user is blocked until the next cycle. This is a classic fixed-supply model—similar to a blockchain's gas limit. The invariant is that the total tokens consumed should equal the sum of all user interactions, adjusted for known overhead. On August 26, the sum exceeded the expected value by a significant margin. OpenAI's team acknowledged three causes: long conversation image compression, auto-title generation, and the new Computer History feature. But the underlying technical details tell a deeper story.
Core: Code-Level Analysis of the Compression and Cache Failures
Let's start with the image compression waste. When a user uploads multiple images over a long conversation, Codex re-compresses the entire history each time a new image is added. The article notes that "when images are many and compressed multiple times, the process currently produces extra waste." This is a classic case of inefficient state management. From my experience auditing the 0x Protocol v2 Order Manager, I've seen similar patterns where repeated compression of the same data set leads to non-linear expansion. In Codex's case, the compression algorithm is likely a summarization-based method that re-encodes the entire visual context on every new image. This means the token cost of each image is not fixed but grows with the number of previous images. The result is a quadratic explosion in token consumption for long, image-heavy conversations. The engineering fix is to switch to incremental compression—only encode the delta, not the full history. But that requires a fundamentally different architecture.
Second, the cache hit rate degradation. Tibo explicitly stated that "some users' cache hit rate worsened yesterday." In a token-based system, caching is the equivalent of a state channel: previously computed results (KV cache from attention layers) are reused to avoid re-computation. When the cache miss rate increases, every request must go through the full inference path, consuming tokens as if the conversation were new. The likely cause is a prefix cache invalidation problem. If the system uses a semantic cache that keys on the conversation prefix, then any change in the compressed representation (due to the image compression issue above) will generate a new cache key, invalidating the old entry. This creates a feedback loop: more compression → more unique keys → more cache misses → more token consumption → more compression. The invariant breaks.
Third, the automatic title generation. This feature triggers a lightweight model call every time a new conversation is started. But the article reveals that this call is not lightweight at all—it consumes a significant amount of tokens. In my analysis of the EigenLayer restaking architecture, I learned that even seemingly trivial operations become expensive when scaled to millions of users. The title generation consumes a fixed token budget per conversation, regardless of conversation length. For users with many short conversations, this fixed overhead dominates. The system should batch these calls or offload them to a cheaper model, but instead, it treats each title as a full inference step.
Contrarian: The Blind Spot Is Not the Reset, but the Absence of an Economic Invariant
OpenAI's response—reset all paid users' usage and promise future optimizations—is a classic band-aid. The real blind spot is that the system lacks an on-chain-like economic invariant. In DeFi, every transaction has a gas cost that is verifiable, transparent, and auditable. Codex has none of that. Users cannot see how many tokens they consumed per action, nor can they trace the cause of an anomaly until after the fact. The reset is a generous gesture, but it reinforces the idea that the system is a black box. The contrarian argument is that the context compression and caching issues are symptoms of a deeper architectural flaw: the absence of a provable resource accounting mechanism. Without a verifiable token budget, users are forced to trust that OpenAI's billing is fair. This incident shows that trust is fragile.

Moreover, the Computer History feature—which injects real-time screen data into the context—is a ticking time bomb. It introduces a continuous stream of environment data (screenshots, app states, web content) that is tokenized inefficiently. If the system uses raw image tokens instead of a visual summary, the token consumption scales with the user's activity, not the model's interaction. This is analogous to a blockchain that accepts arbitrary data blobs without rate limiting. The fix is to pre-compress the environment data into a fixed-size representation, but that requires a radical redesign of the data pipeline.
Takeaway: The Invariant Must Be Restored
Entropy increases, but the invariant holds. The Codex consumption anomaly is a warning sign for all AI-as-a-service platforms. Token economics is not just a billing model; it is a security property. When the system's resource accounting fails, user trust erodes, and the platform's value proposition collapses. The optimizations OpenAI promises must go beyond simple cache tuning. They need to introduce a transparent, verifiable token metering system—something akin to a gas meter on a smart contract. Until then, every user is a counterparty to a one-sided trust agreement. The next anomaly might not be a simple reset; it could be a full-scale economic attack. Code is law until the context compression bug. Then it's just a bug.