# Why Claude Code Limits Run Out: Usage Forensics

> Find out from your own transcripts why the Claude Code 5-hour or weekly limit runs out: heavy days and sessions, subagent share, context size, the tool outputs that bloat it, looping hooks. Then a ranked list of fixes.

Why Claude Code Limits Run Out: Usage Forensics is a paid AI agent skill on Agensi by Claude Workflow Lab, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $7 (one-time purchase)
- Creator: [Claude Workflow Lab](https://www.agensi.io/creators/creator-1578)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Version: 1.0.0
- Last updated: 2026-12-03
- Security: scan passed (2026-12-03); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/why-claude-code-limits-run-out-usage-forensics
- Tags: llm-ops, productivity, testing, claude-code, usage, limits, tokens, context

## What it does

- Shows which days, sessions and subagents used your Claude Code plan limit
- Finds the tool outputs and screenshots that bloat the context
- Catches looping hooks and miscounted subagent runs; read-only script included
- Breakdown usage between your main chat and background sub-agents
- Estimates how much you can save by changing how you handle large outputs

## Who it's for

- **Founders building with AI tools:** Understand why your usage limits disappear so you can build longer without interruption. Try: "Find out why I hit my 5-hour limit today."
- **Freelancers using AI for coding tasks:** Identify which projects or specific tools are eating up your plan's tokens. Try: "Which of my coding sessions used the most tokens this week?"
- **Teams managing shared AI accounts:** Track usage across different days and sub-agents to keep costs down. Try: "Check if our sub-agents are using the most expensive models by mistake."

## About this skill

Hit the 5-hour limit before lunch and do not know why? This skill answers from your own session transcripts instead of guesses.

**What is inside**
- `SKILL.md`: a seven-step audit. Heavy days and limit messages first, then the sessions inside the burned window (main thread or subagent, model, largest context), then what filled the context in those sessions, looping Stop hooks, and an honest count of subagent runs. It ends with a report format: the main cause in one line, the numbers, then what to change and what it should save.
- `scripts/token_ledger.py`: a read-only, standard-library script. It deduplicates API calls, weights tokens by price ratios (cache reads, cache writes, input, output) and prints per-day weight, subagent share and median context, the top sessions in a time window, context-size buckets for one day, the times of limit messages, and the tool results and attachments that filled one session. It writes nothing and makes no network calls.
- A list of the patterns that usually turn up: long sessions re-reading a huge context, browser tools echoing large code into the chat, screenshots, a hook that blocks the same turn again and again, subagents silently running on the most expensive model, and usage from other devices on the same account.

**Who it is for:** heavy Claude Code users on a subscription plan who keep running into the limit.

**Needs:** Claude Code transcripts on disk and Python 3. Weights are relative (they rank days and sessions), not the plan's own meter.

## Requires

- Claude Code
- Python 3 (standard library only)

## Known limitations

This skill only sees activity on your local machine. It cannot track usage from the mobile app or web browser unless they share the same history.

## Technical details

This skill uses a Python script (token_ledger.py) to parse local JSON transcript files located in ~/.claude/projects or a custom CLAUDE_PROJECTS_DIR. It calculates relative weights for input, output, and cache operations (standardized at 1, 5, 1.25, and 0.1). It analyzes sub-agent metadata and hook error logs to identify looping turns. The analysis is read-only and does not modify session history.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Why Claude Code Limits Run Out: Usage Forensics skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this skill figure out where my plan usage went?

This skill reads your local transcript files to find out exactly why you hit your usage limits. It identifies if your tokens were used by long chat sessions, specific sub-agents, or large pieces of data like browser logs and file outputs.

### What kind of report will I get after the scan is finished?

You will receive a one-line summary of the main cause of your usage followed by specific data on your heaviest days and sessions. It also provides a ranked list of recommended fixes with estimates on how much each change might save you.

### Can this tell me if a specific tool or another device is the reason I ran out of tokens?

This skill can see if your limits were reached because of background tasks that kept looping or if sub-agents were using expensive models by default. It also checks if your account was used on other devices, like a phone or web app, which also counts toward your total plan limit.

### Do I need to install anything extra or have special files for this to work?

You do not need any special software other than your AI agent. The skill uses a built-in script to read the project files and transcripts already stored on your computer in your local project folder.

### What should I say to my AI agent to get it to run these forensics?

To start the audit, you can ask your agent to find out why your limit runs out so fast or ask it to show you where your tokens went. You can also ask if specific plugins are worth keeping based on how much they actually impact your usage.

### Are there any things this skill cannot track or calculate exactly?

The skill uses relative weights to compare your different sessions and days rather than showing the exact percentage used by your plan provider. If you used your account on a different computer or the web app, the skill will note that those sessions are missing from your local history rather than guessing the cause.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
