Repository navigation
feat(eval): stop on a Claude quota outage and resume the run later - #5533
Conversation
A passing scenario kept only the driver's own guess at its cost and dropped the token counts claude -p reports, so nobody could say what a flagship sweep cost or where its tokens went. Each scenario now records input, output, cache read, cache write, API calls and list-price cost under `claude_usage`, summed across --iterations attempts. The scorecard adds them up per category and per run, summary.md shows the table, and the all-lanes CI summary adds the lanes. Usage is filed by role. The scenario session is the `driver`, and it also judges every turn, so its tokens cover both jobs; a separate judge-only call files under `judge`. A scenario killed on timeout records nothing, and the totals say how many scenarios they are missing.
When the Claude account behind gaia eval agent ran out of quota mid-run, every later scenario failed within seconds as an ordinary error and the run stayed green: v0.25.1-rc2 lost 68 of 343 scenarios that way. The runner now reads each failed claude -p call and, when Claude itself was the problem (out of quota, credential rejected, or never answered), stops at once. That scenario is INFRA_ERROR, every later one is NOT_RUN, neither counts as a pass, an error or a regression, and the run exits 3 naming the account, when the limit resets and the command to finish it. `gaia eval agent --resume RUN_DIR` runs only the scenarios without a result, under the run's own model, agent and settings, and rewrites that run's scorecard with everything merged. Each result records the commit and time it ran at, so a scorecard that mixes commits says so. Only the CLI's own error fields are classified, never a transcript: the agent's sleep tool description says "until a rate limit resets". The phrase lists extend judge_outage's with the subscription CLI's wording. The integrity gate's --fail-on-zero-token-errors also counts these scenarios, so a dispatch still fails on a quota outage. Refs #5265
|
Verdict: Approve with suggestions When Claude's quota or credential gives out partway through an eval, the run now stops at once and marks every remaining scenario as "not run" instead of quietly recording dozens of fake errors and going green. A new One thing to weigh before merge: a failed driver call that used zero tokens is treated as "Claude unavailable" even when its message doesn't look like a quota or credential problem. A per-scenario setup failure that dies before any API call would then stop the whole suite with exit 3 and a misleading "resume later" message. Consider keeping that fallback but showing Claude's raw error in the headline, or requiring a second consecutive hit before stopping. Real-world evidenceThe evidence stage ran the non-inference CLI paths on The no-scorecard, pre- 🔍 Technical details🟢 Zero-usage fallback can stop the suite on a non-Claude failure ( 🟢 Integrity gate exit depends on summary counters, not 🟢 Strengths
|
eval_flagship.yml runs lane_summary.py as a plain file on a hosted runner with no GAIA install, and the new usage table imported gaia.eval.claude_usage, so the summary step would fail on every run. The two helpers it needs are now inlined (stdlib only), a test pins them to claude_usage's fields, and another runs the file exactly as CI does (python -S, no gaia on the path).
A failed driver call with zero tokens and no quota or credential wording could be one scenario's own problem, not the account's, so a single one no longer stops the whole suite: it is recorded as INFRA_ERROR, stays resumable, and a second one in a row stops the run. Explicit quota and credential failures still stop at once. The integrity gate now fails on outage results counted from the scenarios themselves, so a scorecard with a stale summary block cannot pass an outage.
|
Took all three suggestions. A single zero-token failure with no quota or credential wording no longer stops the suite; two in a row do. The gate now fails on an outage even when a scorecard's summary is stale, and the docs say "each scenario that ran" records its commit. 🔍 Technical details
|
# Conflicts: # docs/reference/eval.mdx # src/gaia/eval/runner.py # src/gaia/eval/scorecard.py # tests/unit/eval/test_claude_usage.py
Main moved the scenario loop into _execute and made runs resumable (#5533). The agent-model pin now follows that shape: _execute passes it to every scenario, _finish records the model the run may claim, and a resumed run keeps its own pin and refuses a different --agent-model, the way it already refuses a different --model.
The plan's cost-and-tiering section has largely landed since it was written: the RC smoke tier, nominated full sweep, weekly backlog lane and Qwen3.6 scoring (#5535), real Claude usage per scenario (#5525) and quota stop-and-resume (#5533). The status line, the implementation table and the stale "isn't recorded" and "v0.25.1 final" claims now say so, and two answered open questions are dropped. Also fixes the two contradictions the review flagged: the scenario eval could have caught 2 escapes, not 3 (#5413 needs a scripted model), and item 3 adds re-runs to the existing Strix Halo eval.
When the Claude account running a flagship eval ran out of quota, every remaining scenario failed in seconds as an ordinary error and the run still went green: v0.25.1-rc2 lost 68 of 343 scenarios that way (#5493, section 6.4). Now the run stops the moment Claude's quota or credential gives out (or Claude fails to answer two scenarios in a row): nothing else is launched, the rest are recorded as
NOT_RUN(never PASS, never an ordinary error), and it exits 3 with the account, the reset time and the command to finish it.gaia eval agent --resume <run-dir>then runs only the scenarios without a result and merges them into the same scorecard, each stamped with the commit and time it ran at.Closes #5265. Stacked on #5525 (Claude usage); I'll rebase onto
mainonce that merges.In CI a quota stop already ends the lane (any non-zero exit does), and the integrity gate's
--fail-on-zero-token-errorsnow also counts these scenarios, so a dispatch still fails. The lane's run directory doesn't survive the job, so CI re-dispatches the printed-f scenarios=...list (#5513) rather than using--resume.Test plan
pytest tests/unit/eval tests/test_eval.py tests/unit/test_eval_launch_contract.py: 1579 passed, 30 skippedtests/unit/eval/test_quota_resume.pyruns the real runner loop against a fakeclaude -pthat runs out of quota after N scenarios: nothing is launched after it, the rest areNOT_RUN, exit code 3, the message names account, reset and resume command, and the token never reaches the log--model, stops again if the quota runs out again, and is a no-op on a finished runclaude_outageorNOT_RUNnever stop a runclaudeCLI (2.1.303): "You've hit your limit", "Usage limit reached", "monthly spend limit", "limit resets"PYTHONPATH=src python util/lint.py --allpasses🔍 Technical details
gaia.eval.claude_outage.classify_driver_failurereads only the CLI'sis_errorresult,api_error_status, and stderr/stdout when there is no JSON. Its phrase lists extendjudge_outage's with the subscription CLI's wording.util/classify_claude_probe.pykeeps its own copy because it runs in the preflight before GAIA is installed.AgentEvalRunner._execute, which fresh and resumed runs share. The.progress.jsonpath it replaces could never resume anything because every run got a new directory.--resumereads the run's ownscorecard.json, which now carriesconfig.plan. CI uploads that file, so a lane that restores its previous artifact could resume too.