{"record":{"id":"2fb5b9472392eb61","repo":"paperclipai/paperclip","slug":"claude-cli-usage-endpoint-is-rate-limited-right-no","errorCode":null,"errorMessage":"Claude CLI usage endpoint is rate limited right now. Please try again later.","messagePattern":"Claude CLI usage endpoint is rate limited right now\\. Please try again later\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/adapters/claude-local/src/server/quota.ts","lineNumber":390,"sourceCode":"    return firstLine;\n  }\n\n  const resetLine = lines.find((line) => /^resets/i.test(line) || normalizeForLabelSearch(line).startsWith(\"resets\"));\n  if (!resetLine) return null;\n  return resetLine\n    .replace(/^Resets/i, \"Resets \")\n    .replace(/([A-Z][a-z]{2})(\\d)/g, \"$1 $2\")\n    .replace(/(\\d)at(\\d)/g, \"$1 at $2\")\n    .replace(/(am|pm)\\(/gi, \"$1 (\")\n    .replace(/([A-Za-z])\\(/g, \"$1 (\")\n    .replace(/\\s+/g, \" \")\n    .trim();\n}\n\nexport function parseClaudeCliUsageText(text: string): QuotaWindow[] {\n  const cleaned = trimToLatestUsagePanel(cleanTerminalText(text)) ?? cleanTerminalText(text);\n  const usageError = extractUsageError(cleaned);\n  if (usageError) throw new Error(usageError);\n\n  const lines = cleaned\n    .split(\"\\n\")\n    .map((line) => line.trim())\n    .filter((line) => line.length > 0);\n\n  const sections: Array<{ label: string; lines: string[] }> = [];\n  let current: { label: string; lines: string[] } | null = null;\n\n  for (const line of lines) {\n    if (isQuotaLabel(line)) {\n      if (current) sections.push(current);\n      current = { label: canonicalQuotaLabel(line), lines: [] };\n      continue;\n    }\n    if (current) current.lines.push(line);\n  }\n  if (current) sections.push(current);","sourceCodeStart":372,"sourceCodeEnd":408,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/packages/adapters/claude-local/src/server/quota.ts#L372-L408","documentation":"Error \"Claude CLI usage endpoint is rate limited right now. Please try again later.\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at packages/adapters/claude-local/src/server/quota.ts:390 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Wait and retry the usage check later; the endpoint is rate limited."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}