feat(agents): Claude Code's and OpenCode Go's usage limits (W36, D1301–D1305) #241
All Vouch review confidence checks passed
Residual risk 0.25 = Change Risk (0.47) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.47 · 351 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 99% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.351
Shallow Review Depth
shallow_review_depth
0.344
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #241"
general
weight: 0.35
claude[bot]
Workstream W36 (round 4 of
docs/plans/t3-roadmap.md), slice 1: Claude Code's and OpenCode Go's usage limits. Before this only Codex reported them. Decisions D1301–D1305 indocs/plans/providers.md("Usage, accounts and the providers' rest (W36)"). The port follows T3 Codeeb7b35ac:claudeUsageLimits.ts, the usage-limit classification inClaudeAdapterV2.ts, andprovider-opencode/usageLimits.ts.What changes
skipBehaviorsand a 4 s deadline. Rows: Session, Weekly, and "Weekly · {model}". An API key givesunsupported. A failed read givesprobeFailedwith the reason.rate_limit_events are merged onto the last read, matched by window id. The overage-included bucket lands on the model-scoped row the read named.UsageLimitError, using T3's rule: a 429; or a rejected window without overage, or an assistantrate_limiterror, followed by a failed result. ItsresetAtis the latest reset of the rejected windows. A gateway's 503 that wraps a 429 also counts. A full context window (blocking_limitwith no rejection) still says the context is full.agents.usage-limitsreads Claude's limits again when they are a minute old, failed, or past a reset./usage-limitsnow appears for Claude Code.OPENCODE_API_KEY). Jhin keeps no copy of the key. There are none for a configured server, without a key, or on a 403.The OpenCode and Claude Deferred lines are removed. What is left over (T3's mid-turn "paused until" notice,
api_retry, events outside a turn, the Go credential fingerprint) goes into the new Deferred list.Evidence
The local e2e run failed on a machine shared by ~20 threads, after 700 s. This PR has no UI change, so the e2e result is left to CI.
The real usage request needs a signed-in Claude.ai account, which this machine does not have. It is proven against a scripted query that answers
usage_EXPERIMENTAL_MAY_CHANGE_DO_NOT_RELY_ON_THIS_API_YETand emitsrate_limit_events. OpenCode Go is proven against a fakefetch.🤖 Generated with Claude Code