Tare: Diagnosing Claude Code Token Usage and Quota Limits

Tare is a local-first diagnostic tool designed to identify the causes of rapid token consumption and quota exhaustion in Claude Code. By analyzing the session logs already stored on a user's machine, Tare allows developers to query their usage history in plain English to determine exactly which files, tools, or automated processes are draining their quota.

Token Audit and Limit Diagnosis

Tare transforms raw session logs into actionable insights, moving beyond simple token counts to identify the root causes of usage spikes. The tool provides answers to specific operational questions such as:

  • Quota Exhaustion: Identifying whether a user hit a five-hour rolling window limit or a weekly cap.
  • Token Attribution: Determining which projects, models, or specific files are consuming the most tokens.
  • ** uma** Identifying if background processes or automated scripts are spawning parallel sessions that inflate costs.
  • Optimization: Comparing usage patterns before and after implementing strategies like using /clear to reset context.

Advanced Usage Analysis

Unlike naive token counting, Tare implements several logic layers to ensure accuracy in its reporting:

  • Deduplication: Claude Code's log format often repeats API responses multiple times; Tare deduplicates these to prevent inflating totals (which can be as high as 86% in some cases).
  • Contextual Costing: Tare attributes the cost of a file read to every subsequent message in a session, recognizing that a large file read early in a long session continues to dominate the context window.
  • Rolling Window Tracking: The tool tracks the five-hour rolling window to tell users exactly how full their quota was at the moment of lockout.
  • Automation Detection: Tare recognizes the signature of hundreds of short, parallel sessions, which typically indicates a script rather than human interaction.

Privacy and Technical Requirements

Tare is designed to be private by default. All analysis is performed locally on the user's machine, and the scripts make no network connections. When generating shareable summaries, the tool redacts prompts, file paths, and account identifiers, providing only totals, dates, and tool names.

Technical Requirements:

  • OS: macOS or Linux.
  • Runtime: Python 3.9+.
  • Compatibility: Currently supports Claude Code logs only.

Installation and Interface

Users can install Tare as a Claude Code skill using the following command:

npx skills add kelviq/tare -g -y --copy --agent claude-code

Once installed, users can interact with Tare via plain English queries within Claude Code or through specific slash commands:

Command Function
/tare Full diagnosis of token usage and causes
/tare usage At-a-glance panel with attribution
/tare window Status of the five-hour rolling window
/tare report [days] Generates and opens an HTML usage report
/tare tools [days] Analysis of context-filling tools
/tare share [days] Creates a redacted summary for public sharing

Community Insights and Alternatives

Community discussion highlights a recurring struggle with the "black box" nature of token limits. Some users have implemented their own custom status lines to track usage in real-time to avoid surprises.

"I just used Claude to write a plug-in which changed the bottom of the CLI to say: ( ) Usage: 34% (resets in 2h 47m) Context: 56%... That way if my usage starts shooting up, it's very easy to notice."

Other users noted that rapid quota depletion is often caused by open-ended requests that dispatch multiple subagents or the expiration of large context caches, leading to repeated high-cost reads.

Sources

Related

  • Dispatch
  • Project
  • Project
  • Dispatch
  • Project