Repository navigation
Description
This was generated by AI during triage.
What happened
On 2026-10-29, an A/A Experiment finished all 36 of its Trials, which ran on Codex. Its model Grader runs on Claude Code. The Grader's first stream event was a rate_limit_event with status: "allowed_warning", rateLimitType: "seven_day", utilization: 0.77 and surpassedThreshold: 0.75. The five-hour window stood at utilization: 0.05. The Experiment paused, and the seven-day window resets 36 hours later. Grading the whole Experiment is a single Grader session of a few seconds.
Claude and Codex warnings stop Eval work at different points:
- Claude: any
allowed_warningorrejectedevent, and Claude sendsallowed_warningfrom 75% of a window. - Codex: only a quota window at 85% or more, or a reached limit.
The guide documents this as "A Claude plan-limit warning or rejection, or a Codex quota window at 85%". #1008, which built the stop, wanted Experiments and Scoring to stop at a warning so they don't use up quota Runs need. It didn't choose different thresholds per Harness.
Decision (maintainer, 2026-10-29): use the same 85% threshold for Claude as for Codex.
Agent Brief
Category: bug
Summary: A Claude plan-limit warning stops an Experiment or Scoring run only when the reported window is at 85% or more, or when it is a rejection, as Codex's already does.
Current behavior:
Claude's quota decoder treats every rate_limit_event whose rate_limit_info.status is allowed_warning or rejected as reaching the limit.
Desired behavior:
rejectedstops, whatever the utilization.allowed_warningstops only at 85%. It stops whenrate_limit_info.utilizationis 0.85 or more, or when any window underrate_limit_info.unifiedWindowsthat reportsutilizationis at 0.85 or more. Below that, the event is not a limit and the session carries on.- No utilization means stop. An
allowed_warningwith no readableutilizationanywhere still stops, as today, so an unexpected format stays on the safe side. - Codex is unchanged. The 85% figure is shared, as one named constant or a doc comment, so the two Harnesses can't drift apart again.
- Runs are unaffected. Only Experiments and Scoring runs use this stop.
Key interfaces:
- Claude's quota decoder (
interpretation::limits::claudetoday) decides fromstatustogether withutilizationandunifiedWindows.*.utilization. docs/guide.md's sentence on plan-limit stops for Scoring, and any matching wording for Experiments, should say "a Claude or Codex quota window at 85%, or a Claude rejection".
Acceptance criteria:
- A stream test with
allowed_warning,seven_day,utilization0.77 and a five-hour window at 0.05 does not stop. -
allowed_warningwithutilization0.85, or with any window at 0.85 or more underunifiedWindows, stops. -
rejectedstops at any utilization. -
allowed_warningwith noutilizationfield stops. - The existing Codex limit tests and Experiment pause/resume tests pass.
Out of scope:
- A User config setting for the threshold.
- How a paused Experiment's Command outcome is recorded (filed separately).
- Warning detection for the other Harnesses.
Activity
docs: align the Trial quota-stop protocol with #1618
Merge origin/main into issue-1618