Repository navigation
Report usage-limit hits - #11
Merged
Merged
Conversation
Counts the times a plan's usage limit stopped a session: Claude Code's error message for a request the limit rejected (5-hour, weekly, weekly Opus / Sonnet, extra usage, spend limits; type and reset time from its rate_limit_info, or the text in older versions), and Copilot's quota and rate_limit session errors. Transient capacity 429s are left out. The summary and period reports add a Usage limits table and a summary line when a limit was hit; JSON always has usageLimits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # src/copilot.mjs # src/loader.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reports how often a usage limit stopped a session.
What counts as a hit
apiError: "usage_limit_reached"withrate_limit_info). The limit type (5-hour, weekly, weekly Opus/Sonnet, extra usage) and reset time come from it. The olderClaude AI usage limit reached|<epoch>format and team/enterprise spend limits count too.session.errorevents witherrorTypequota(premium requests used up) orrate_limit.apiErrorIsTransient), login, server and model errors, and context-full ormax_tokensstops. Cursor logs no errors.In the reports
usageLimitsobject with totals, per-limit counts and each hit.Testing
test/limits.test.mjs: detection (structured, text-only, legacy, spend; transient/login/server excluded), Copilot errors, the Claude loader's dedupe of resumed copies, the Copilot loader, stats and rendering.🤖 Generated with Claude Code