Mukul Mishra

Back to System Design Index

Developer ToolsSeptember 202619 min read

Your $20 Subscription Meets a Paywall at 11:47 AM

Tuesday, 11:47 AM. You are mid refactor, the agent finally holds the whole plan in its head, the screen prints five words every developer now hates. Limit reached. Come back later. Behind that message sits a meter that replays your entire session on every turn, rots what it remembers, plus bills you for the forgetting. This is the postmortem.

TL;DR: Cursor and Claude Code hit token walls at 11:47 AM when 575K context compacts to 4.3K. Context rot plus compaction cliffs force full re-reads. Fix is cache-aware turns with survival math.

Pro Subscription
$20 / month
Session Appetite
50 to 200K tokens
Compaction Survival
Under 1 percent
Core Flaw
Context Rot

By Mukul Kumar Mishra · Research-led architecture teardown · Updated September 4, 2026

Cursor versus Claude Code token exhaustion showing prompt, tool outputs, context window stages, compaction, cache TTLand cost per task
Figure 1. The session lifecycle in one image. Fresh context bloats, rots, gets compacted into a fragmentand meets the cap while cost per task climbs.

1. The Five Words That Kill Flow State

Every developer using Cursor or Claude Code daily knows the moment. The agent has read twenty files. It finally understands the auth module. It is three edits away from done. Then the limit message arrives and your morning splits in two. There is the work and there is the meter running underneath the work.

Comment threads blame everything. The model is greedy. The vendor is greedy. The cache expired. The intern left a test log in the repo. Most of the advice online treats the meter like weather. Something that happens to you. I spent nine years watching meters like this oneand meters are never weather. They are architecture with a billing page.

So here is the postmortem nobody asked for but every daily user needs. They built agentic coding that replays your entire session on every single turn. The big issue is that context behaves like a recurring charge with a rising rate, while the pricing page talks like you are buying countable requests. We are doing the postmortem on that mismatch, with math, because anger without arithmetic is just a comment thread.

The postmortem thesis: They built pair programmers that remember everything by re reading everything. The big issue is context rot plus cache economics plus triple limit systems. We are doing the postmortem on why your $20 subscription keeps meeting a paywall at 11:47 AM.

2. Productivity Math: What the Limit Actually Costs You

Start with the developer, not the dashboard. A mid level engineer costs roughly $75 per hour fully loaded. A $20 monthly subscription looks like pocket change next to that. It breaks even if it saves about sixteen minutes in an entire month. Of course it pays for itself. That was never the real question.

The real question is what happens after the subscription stops covering the work. Take a heavy agent day. Three long sessions, each burning roughly $4 of model compute at API rates. That is $12 in one day. Over twenty working days that pace becomes $240 a month, twelve times the sticker price. Cursor documents exactly this shape. Daily agent users typically land near $60 to $100 of total monthly usageand power users running parallel agents pass $200. The $20 is an entry ticket. The meter decides the final bill.

Now price the interruption itself. A limit hit mid refactor costs thirty to forty five minutes of flow state. The agent loses momentum, you lose the mental model and the restart tax lands on the most expensive resource in the building, which is you. At $75 an hour, two limit hits a week cost about $200 a month in lost focus alone. Add the overage spend and the true monthly cost of heavy agentic coding lands near $250 to $450 per developer. Still worth it for the output, probably. But let us stop pretending the tool costs twenty dollars. It costs twenty dollars plus whatever your attention is worth at the exact moment the meter says no.

Monthly pictureLight userHeavy agent user
Subscription sticker$20$20 to $60
Model overage paceNear zero$40 to $200
Flow state lost to limitsRareAbout $200 in focus time
True monthly shapeAbout $20$250 to $450
Budget tip: Track cost per completed task, not cost per month. A $3 task that ships is cheap. A $0.40 task that burns the session and gets reverted twice is the most expensive line on your bill.

3. The Two Machines You Are Actually Paying For

Cursor and Claude Code look like one category and bill like two different philosophies. Cursor sells monthly pools of model compute. Pro at $20 carries about $20 of third party model usage plus a generous first party pool. Pro Plus at $60 carries about $70. Ultra at $200 carries about $400. Teams seats add a $0.25 per million token rate on third party routes. When the pool empties, eligible plans keep going on pay as you go at the same API rates. Nothing quietly downgrades. The meter just keeps running with your permission.

Claude Code sells allowance windows instead. A rolling five hour session cap for burst protection, a weekly cap for total volumeand a separate Opus allowance on top. Pro at $20 gets roughly 10 to 40 prompts per five hours. Max plans multiply the allowance by 5x or 20x. Switching models does not restore a spent window, because consumption tracks tokens, not turns. Hitting the Opus allowance is the one exception where switching models keeps you working.

Both vendors meter the same underlying fuel. A typical agent prompt with full repo context fires 50K to 200K input tokens, because the harness pulls surrounding files, editsand diffs into every call. On Sonnet class pricing near $3 per million input tokens, that single prompt costs $0.15 to $0.60 before a word of output. On Opus class pricing near $15 per million, the same prompt costs $0.75 to $3.00. Output tokens cost roughly five times input. One wrong 400 line diff that you revert and regenerate bills you twice for the same lesson, plus the turns spent arguing about it.

4. Why Tokens Confuse Everyone, Including Smart People

Tokens get misunderstood because three different scarcities wear the same costume. Usage limits cap how much you consume over time. Context limits cap how long one conversation can grow. Cache behavior decides what each token costs. Developers hit all three in one week and file them under one feeling. The tool feels stingy. The fixes for each scarcity are opposites, which is why generic advice keeps failing.

A full window is fixed by clearing or compacting. Waiting does nothing. An exhausted allowance is fixed by waiting or paying. A fresh conversation does nothing. A cache miss is fixed by session hygiene. Complaining does nothing. Anthropic docs say this plainly, yet I watch experienced engineers mix them up every week, because all three failures arrive wearing the same tired message about limits.

01FreshSmall context, sharp answers, cheap turns.
02BloatedTool outputs pile up, every turn replays all of it.
03RottingRecall degrades long before any hard limit.
04CompactedUnder 1 percent survives, cache breaks, bill spikes.
05CappedWeekly or session window ends the run.

The cruelest stage is the third one. Research on long context agents keeps finding the same pattern. Recall quality falls as windows fill, well before any hard cap. One large study measured active useful context at a few thousand tokens no matter whether the window held 39K or 645K. Everything beyond that is mostly inert weight you pay to reprocess. Adding tokens past the useful frontier does not add understanding. It adds distraction at full price.

Pen sketched cartoon of a grinning cat meeting a goldfish that holds the session memory
Figure 2. Session memory in one cartoon, drawn for this postmortem. The agent meets your auth module like a stranger, then bills you for introductions.

5. Postmortem: Why the Architecture Burns Context

An agentic coding session is a loop. The model emits a tool call, the harness runs it, the result gets appended to the conversationand the entire conversation goes back in on the next turn. Context is therefore not a tank that drains. It is a subscription that reprices upward every step. Early steps add about 3,200 tokens each. Later steps settle near 1,470. Total spend grows faster than linear because every step re purchases the history.

Then comes the compaction cliff, the part vendors describe gently and researchers describe with numbers. One careful study of 873 real compactions found the median event crushing a 575K token window into a 4.3K summary. Under one percent survives. The agent then spends roughly 28 steps re reading files and rebuilding state it already knew yesterday. Correction rates run more than twice as high after compaction while tool error rates stay flat. Read that twice. The tools are fine. The memory got mugged.

Cache economics sharpen the blade. Prompt caching discounts repeated prefixes by up to 90 percent, which rewards keeping early context frozen. But editing early context breaks the prefix and forces full price reprocessing. Compaction replaces the prefix with a summary, which breaks the cache entirely and causes a cost spike at the worst moment. Even the TTL conspires. Caches live about an hour on subscription and five minutes on usage credits or API keys. Take a lunch break mid session and your first message back reprocesses the world. The system that rewards you for never touching history also punishes you for blinking.

This is the same prefill tax I dissected in my Perplexity postmortem. Every turn reprocesses the full pile before generating anything new. Long context does not just risk quality. It taxes every future step with the weight of every past step. And the retry storms should look familiar too. My Replit teardown showed agents repeating failed tool work because task state was not idempotent. Same religion, smaller church.

Session tip: Run slash clear between tasks and slash compact inside long ones. A plan costs hundreds of tokens. A wrong diff costs thousands twice. Ask the agent to list files and actions before touching anything once the task spans more than three files.
Cartoon of a compaction event crushing a large context window into a tiny summary while the agent forgets the codebase
Figure 3. Compaction in one cartoon, drawn for this postmortem. 575K tokens walk in. A two-line summary walks out. The agent meets your codebase like a stranger, at full price.

6. The 1M Turn Cost Test

Normalize to one million agent turns in a month. Assume each turn carries 80K input tokens with 70K served as cache reads at $0.30 per million and 10K fresh at $3 per million, plus 1.5K output tokens at $15 per million. Cache reads cost $0.021, fresh input costs $0.03, output costs $0.0225. Each turn lands near $0.074. One million turns at that rate equals $74,000 per month in model compute alone.

My proposed shape cuts the context before it cuts the model. Just in time retrieval keeps the working set near 25K tokens. Observation masking drops stale tool payloads while keeping the action record. Routine turns route to smaller models at roughly a fifth of the price. The blended turn falls to about $0.018. One million turns then cost $18,000 per month. Add $4,000 for evals dashboards and guardrails. The proposed envelope is about $22,000 per month.

At 1M turns per monthCurrent shaped habitProposed discipline
Input per turn80K tokens25K tokens
Blended turn cost$0.074$0.018
Core model spend$74,000$18,000
Evals and guardrailsIncluded in chaos$4,000
Modeled monthly total$74,000$22,000
Difference$52,000 per month about 70 percent lower
The uncomfortable math: At one million turns every needless 10K tokens per turn costs about $9250 per month under current shaped rates. Context hygiene is not tidiness. It is payroll.

7. Proof of Work: Runnable Cost Model

Here is the exact cost model used in section 6. Copy paste run in any Python 3 environment and verify the 1M turn totals match the table.

The script above produces the same numbers as the table. If your run produces different values the arithmetic basis is in the comments and you can adjust the per turn constants.

8. What Vendors Could Do Instead of Selling Bigger Buckets

First, meter the task, not just the month. Show cost per completed task with its context curve attached. Developers cannot optimize what they cannot seeand a monthly pool teaches nothing about which habit burned it. A per task meter would end half the internet arguments overnight. Vendors avoid it because per task numbers would reveal how often the harness wastes the budget, not the user.

Second, make just in time the default. Keep file paths and identifiers in context. Load file bodies at read time. Claude Code already gestures this way, but every agent framework should treat full repo dumps as a failure mode. My Vercel teardown made the same point for serverless. Pay for execution, not for waiting around fully loaded.

Third, mask before you summarize. Independent research keeps finding that replacing stale tool outputs with placeholders beats full LLM summarization at roughly half the cost, without the trajectory elongation that summaries cause. Summarization should be the last resort, not the first reflex. Vendors love summarization because it looks intelligent. Masking looks boring. Boring wins.

Fourth, preserve a verbatim tail. The harm of compaction concentrates at the discontinuity where 99 percent vanishes at once. Keeping the last 30K to 60K tokens verbatim alongside the summary cuts both cost and disruption in measured studies. Expose it as a setting instead of hiding the knob. Users who cannot tune the cliff will keep falling off it.

Fifth, stop routing by advertised window. Sending a 90K session to the long context tier because the model supports a million tokens is how small tasks inherit big task pricing. Route by actual size. Bill by actual size. The GitHub issue trackers already contain this complaint in triplicate, which is the open source way of saying the bug is real.

Team tip: Put cache hit rate and prefill tokens per task on the team dashboard next to spend. When prefill per task climbs while output stays flat, your agents are rereading the past instead of writing the future.

9. The Verdict

Cursor and Claude Code earned their daily driver status. Agents that read code, run toolsand iterate genuinely compress weeks of grunt work. The postmortem does not take that away. It names the price structure underneath. Every turn replays history. History grows faster than value. Compaction rescues the window by amputating the memory. Caches reward frozen prefixes and punish living sessions. Three different scarcities share one tired error messageand the user pays in the one currency vendors never meter, which is attention.

The way out is not a bigger bucket. It is a stricter context diet enforced by the tools themselves. Retrieve just in time. Mask stale outputs. Preserve verbatim tails. Route by actual size. Meter per task. At the normalized million turn scale, that discipline is worth about $52,000 a month in this model. For a fifty person engineering org, it is the difference between AI leverage and AI landlordship.

The cliffhanger writes itself. Agent fleets multiply every one of these curves, because each teammate carries its own window and its own bill. One developer hitting a limit is an annoyance. Ten agents hitting limits in parallel is a capacity plan. The vendors selling bigger buckets today will eventually have to sell smaller appetites. The only question is whether they do it before your finance team notices.

You are not running out of intelligence. You are running out of remembering.

9. Keep Reading the Postmortem Series

If the meter is your enemy, the rest of the series maps the same war on other fronts. My Perplexity teardown covers the prefill tax behind every AI answer. My Vercel teardown covers paying for idle wait as if it were work. My Replit postmortem covers agent retry storms that bill you for learning nothing. Same religion, different crime scenes.

Sources and Method

Pricing, limits, context windows, cachingand compaction behavior come from official docs and help centers linked below. Productivity rates and the 1M turn model are my normalized scenario math, not vendor invoices. Research findings on compaction and context rot are summarized from public studies.