Your AI Coding Limits Ran Out Early? Find What Is Burning Them A developer published a guide for diagnosing why Claude Code and Codex subscription usage limits run out early, pointing to Anthropic and OpenAI documentation on usage reporting. The guide walks through Claude Code's /usage breakdown of skills, subagents, plugins and MCP servers, Codex's /status and /usage commands, and a status-line script that surfaces five-hour and seven-day rate-limit percentages. You open Claude Code or Codex in the morning, do what feels like a normal amount of work, and by early afternoon you've hit your limit. The obvious fixes are a bigger plan or a different model. Before either, find out what actually used the allowance. Usually it isn't the prompts you typed. In an earlier article https://dev.to/promptmaster/where-your-coding-agents-token-bill-goes-and-7-levers-to-cut-it-1e5j I covered seven levers to cut a coding agent's token bill, mostly from the API side. This one is for subscription plans with usage windows: check what the tool already reports, look at the five usual burners, then set a simple model mix. Claude Code details come from Anthropic's docs costs https://code.claude.com/docs/en/costs , errors https://code.claude.com/docs/en/errors , status line https://code.claude.com/docs/en/statusline , model configuration https://code.claude.com/docs/en/model-config , subagents https://code.claude.com/docs/en/sub-agents ; Codex details from OpenAI's pricing FAQ https://learn.chatgpt.com/docs/pricing , CLI commands https://learn.chatgpt.com/docs/developer-commands?surface=cli and model selection https://learn.chatgpt.com/docs/model-selection pages. In Claude Code, the error message tells you which ceiling you hit, and they need different fixes: You've hit your session limit or You've hit your weekly limit . /model doesn't get you back in. You wait for the reset time in the message. You've hit your Opus limit or You've hit your Sonnet limit . The errors page adds a detail worth knowing: usage counts against the session and weekly allowances at the same time, and one burst of heavy activity, such as a large workflow fanout, can use up the weekly allowance before the session window resets. If you see a 429 instead, the docs suggest running /status : a stray ANTHROPIC API KEY in your environment can route requests through a low-tier API key instead of your subscription. Claude Code. Run /usage . On a Pro, Max, Ultra, Team or Enterprise plan it shows a breakdown of what counts against your limits: usage attributed to skills, subagents, plugins and individual MCP servers, plus recommendations for anything behind 10% or more of recent usage. Three details matter when you read it: d or w to switch between the last 24 hours and the last 7 days. On v2.1.305 or later, f applies the recommendations it can act on, showing you each change first. Codex. In the CLI, /status shows the active model and token usage, and per the pricing FAQ your remaining limits during a session. /usage weekly or daily , cumulative opens your token activity, and the usage dashboard https://chatgpt.com/codex/settings/usage shows current limits and reset times. To keep the numbers in view, Claude Code's status line receives JSON on stdin that includes rate limits.five hour and rate limits.seven day subscribers only, after the first API response . A minimal script, saved as ~/.claude/statusline.py and set as the statusLine command in your settings: bash /usr/bin/env python3 """Claude Code status line: model, effort, context, cache hits and plan limits.""" import json import sys data = json.load sys.stdin parts = data "model" "display name" effort = data.get "effort" or {} .get "level" if effort: parts 0 += f" {effort} " ctx = data.get "context window" or {} .get "used percentage" if ctx is not None: parts.append f"ctx {ctx:.0f}%" hit = data.get "prompt cache" or {} .get "hit ratio" if hit is not None: parts.append f"cache {hit:.0%}" rate = data.get "rate limits" or {} for key, label in "five hour", "5h" , "seven day", "7d" : used = rate.get key or {} .get "used percentage" if used is not None: parts.append f"{label} {used:.0f}%" print " | ".join parts I ran it on the example input from the status line docs the docs' sample values, not my usage , then on the same input without rate limits and prompt cache . Real output, Python 3.13.5: bash $ python3 statusline.py < sample-input.json Opus high | ctx 8% | cache 91% | 5h 24% | 7d 41% $ python3 statusline.py < sample-input-api-user.json Opus high | ctx 8% Now you see the 5-hour number move while you work, not afterwards. 1. Model and speed choice. Anthropic's cost docs say Sonnet handles most coding tasks well and costs less than Opus, and that a switch to Opus also applies to subagents that inherit your session's model. On the Codex side, the pricing FAQ is explicit about speed: Fast mode uses included subscription usage at 2.5x the rate of Standard mode for the same model. If /fast is on out of habit, that's the first thing to check. 2. Always-loaded context. Instruction files and tool listings ride along with every request. OpenAI's tips for making Codex limits last longer include reducing the size of your AGENTS.md by nesting files in the repo and limiting MCP servers, because every MCP server adds context to your messages. I covered the trimming in Your Agent's Context Fills Up Before You Type https://dev.to/promptmaster/your-agents-context-fills-up-before-you-type-what-to-trim-first-36n0 . 3. MCP and tool output. Tool results are added to the conversation and re-sent with later requests. In Claude Code's /usage attribution, an MCP server's share counts only the requests that consumed one of its tool results, so a server with a high share is one whose output keeps landing in context. The docs' fixes: prefer CLI tools such as gh where they exist, and push verbose work such as test runs and log reading into a subagent or a hook that returns only the lines you need. 4. Parallel and background work. Every subagent, workflow agent and teammate sends its own requests, and all of it draws from the same windows. Some of it runs while you're not typing: a session-scoped scheduled task fires on its interval even when the session is idle, a message from another of your sessions arrives as a new turn, and goal check-ins start new turns while background work is pending. Each of these sends your full context. /usage has a Loops row for the heaviest scheduled tasks v2.1.242+ , and /tasks shows which model each subagent runs on. 5. Retries and rework. Claude Code already retries transient API failures by itself, up to 10 times with backoff. The retries that cost you are the ones you trigger: re-prompting the same failing approach, or letting the agent go a long way in the wrong direction before you notice. The docs' answers: plan mode before complex changes, Escape as soon as it drifts, /rewind to a checkpoint, and a verification target a test, an expected output so it checks its own work. Set defaults so the expensive model is a choice you make on purpose. Claude Code: opusplan alias: Opus in plan mode, Sonnet for execution. model: haiku in their definition. To force one model onto every subagent, teammate and workflow agent, set CLAUDE CODE SUBAGENT MODEL and CLAUDE CODE SUBAGENT MODEL FORCE=1 v2.1.257+ . /clear , since a switch mid-conversation starts with a cold cache. Codex: /model model --reasoning=