{"slug": "your-ai-coding-limits-ran-out-early-find-what-is-burning-them", "title": "Your AI Coding Limits Ran Out Early? Find What Is Burning Them", "summary": "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.", "body_md": "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.\n\nIn 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.\n\nClaude 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.\n\nIn Claude Code, the error message tells you which ceiling you hit, and they need different fixes:\n\n`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`.\nThe 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.\n\nIf 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.\n\n**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:\n\n`d` or `w` to switch between the last 24 hours and the last 7 days.\nOn v2.1.305 or later, `f` applies the recommendations it can act on, showing you each change first.\n\n**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.\n\nTo 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:\n\n``` bash\n#!/usr/bin/env python3\n\"\"\"Claude Code status line: model, effort, context, cache hits and plan limits.\"\"\"\nimport json\nimport sys\n\ndata = json.load(sys.stdin)\nparts = [data[\"model\"][\"display_name\"]]\n\neffort = (data.get(\"effort\") or {}).get(\"level\")\nif effort:\n    parts[0] += f\" ({effort})\"\n\nctx = (data.get(\"context_window\") or {}).get(\"used_percentage\")\nif ctx is not None:\n    parts.append(f\"ctx {ctx:.0f}%\")\n\nhit = (data.get(\"prompt_cache\") or {}).get(\"hit_ratio\")\nif hit is not None:\n    parts.append(f\"cache {hit:.0%}\")\n\nrate = data.get(\"rate_limits\") or {}\nfor key, label in ((\"five_hour\", \"5h\"), (\"seven_day\", \"7d\")):\n    used = (rate.get(key) or {}).get(\"used_percentage\")\n    if used is not None:\n        parts.append(f\"{label} {used:.0f}%\")\n\nprint(\" | \".join(parts))\n```\n\nI 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:\n\n``` bash\n$ python3 statusline.py < sample-input.json\nOpus (high) | ctx 8% | cache 91% | 5h 24% | 7d 41%\n$ python3 statusline.py < sample-input-api-user.json\nOpus (high) | ctx 8%\n```\n\nNow you see the 5-hour number move while you work, not afterwards.\n\n**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.\n\n**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).\n\n**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.\n\n**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.\n\n**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.\n\nSet defaults so the expensive model is a choice you make on purpose.\n\n**Claude Code:**\n\n`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.\n**Codex:**\n\n`/model [model] --reasoning=<level>`, and confirm with `/status`.`/usage` (Claude Code) or `/usage weekly` plus the dashboard (Codex), before changing anything.`/tasks`.\nThis covers the diagnosis for subscription limits. [LLM Cost Control: The Builder's Guide to Cutting Your Token Bill](https://promptmasterstore.gumroad.com/l/llmcost?utm_source=devto) is the full playbook for when you build on a metered LLM API: how token billing works, the seven cost levers in the order to apply them (measure, cache, scope, control output, route, batch, budgets), prompt caching done right, model routing, a worked end-to-end example, a 30-day plan, emergency cost triage and a pre-launch checklist.\n\n*This article was written with the assistance of AI and reviewed by the author. Claude Code behavior is described from Anthropic's official documentation (costs, errors, status line, model configuration and subagents pages), and Codex behavior from OpenAI's official pricing FAQ, CLI command reference and model selection pages, all fetched on 16 Nov 2026. The status line output is the script's real output on the sample input published in the status line docs, not on my own usage. PromptMaster guides are independent and not affiliated with or endorsed by Anthropic or OpenAI.*", "url": "https://wpnews.pro/news/your-ai-coding-limits-ran-out-early-find-what-is-burning-them", "canonical_source": "https://dev.to/promptmaster/your-ai-coding-limits-ran-out-early-find-what-is-burning-them-1jip", "published_at": "2026-11-19 08:34:50+00:00", "updated_at": "2026-11-19 08:42:06.385885+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "developer-tools", "large-language-models"], "entities": ["Claude Code", "Anthropic", "Codex", "OpenAI"], "also_reported_by": [], "takeaway": "Claude Code's /usage attributes consumption to skills, subagents, plugins and individual MCP servers, and its status line exposes rate_limits.five_hour and seven_day used_percentage so you can watch plan burn in real time.", "recommendation": {"advice": "Run /usage (Claude Code) or /usage weekly (Codex) to find which skills, subagents, plugins or MCP servers drive most consumption, then add a status-line script showing five-hour and seven-day rate-limit percentages.", "playbook": "llm-cost", "playbook_url": "https://wpnews.pro/playbooks/llm-cost"}, "alternates": {"html": "https://wpnews.pro/news/your-ai-coding-limits-ran-out-early-find-what-is-burning-them", "markdown": "https://wpnews.pro/news/your-ai-coding-limits-ran-out-early-find-what-is-burning-them.md", "text": "https://wpnews.pro/news/your-ai-coding-limits-ran-out-early-find-what-is-burning-them.txt", "jsonld": "https://wpnews.pro/news/your-ai-coding-limits-ran-out-early-find-what-is-burning-them.jsonld"}}