Expand description
Usage-limit detection shared by every tool’s result metadata
Ported from Hive Mind src/usage-limit.lib.mjs and
src/claude.usage-limit-sources.lib.mjs (hive-mind#1122, #1290, #1869,
#1924, #1935, #2687, #3570). Reset times are normalized to the shapes Hive
Mind’s parseResetTime accepts (MMM D, YYYY, h:mm A, MMM D, h:mm A,
h:mm A) so the value can be handed straight back to it.
Structs§
- Debug
Lines ANTHROPIC_LOG=debugoutput: which lines are debug dumps, and the 429 verdict- Usage
Limit Verdict - Usage-limit verdict for one run
Functions§
- classify_
debug_ lines - Read
ANTHROPIC_LOG=debugoutput lines (hive-mind#3570) - classify_
rate_ limit_ event - Classify a Claude
rate_limit_event.rate_limit_info(hive-mind#3570) - detect_
usage_ limit_ sources - Detect a usage limit from every source a run leaves behind
- extract_
reset_ time - Extract a reset time, normalized like Hive Mind’s
extractResetTime - extract_
timezone - Extract the reset timezone (
"(Europe/Berlin)","(UTC)","18:30 UTC") - format_
epoch_ reset_ time_ utc - Format an epoch (seconds) as
MMM D, YYYY, h:mm Ain UTC - is_
recoverable_ tool_ error - A failed tool call is a tool result the model recovers from (hive-mind#3213)
- is_
usage_ limit_ text - Whether text reports an account usage limit (not a transient throttle)
- limit_
scan_ text - Text to scan for usage limits: plain lines stay raw, JSON records become their string values (one per line), and tool output is left out.
- split_
output - Split raw output into JSON records and the remaining text lines