The conclusion job files an [aw] … failed issue ("Effective Token Budget Exhausted" / rate-limit error) for runs that concluded success and produced their intended output, when the agent stream contains a rate_limit_event whose status is allowed but whose overage metadata is rejected / out_of_credits.
Root cause
The effective-token / rate-limit classifier in the conclusion job (collect-effective-tokens / handle_agent_failure in the generated .lock.yml) sets GH_AW_EFFECTIVE_TOKENS_RATE_LIMIT_ERROR=true from a rate_limit_event that did not throttle the request:
GH_AW_EFFECTIVE_TOKENS: # empty — no effective tokens counted
GH_AW_EFFECTIVE_TOKENS_RATE_LIMIT_ERROR: true
GH_AW_MAX_EFFECTIVE_TOKENS: 25000000
Effective tokens: (none)
Effective tokens rate-limit error: true
The event that trips it (Claude Code stream-json, claude_code_version 2.1.156):
{"type":"rate_limit_event","rate_limit_info":{"status":"allowed","resetsAt":1782154800,"rateLimitType":"five_hour","overageStatus":"rejected","overageDisabledReason":"out_of_credits","isUsingOverage":false}}
status: "allowed" means the request was served, not rate-limited. overageStatus: "rejected" / out_of_credits only reports that the account has overage disabled — it is account-billing metadata, not a throttle on this run. The classifier conflates "an event mentioning overage rejection exists" with "the run hit an effective-token budget limit," and emits a failure report even though GH_AW_EFFECTIVE_TOKENS is empty and the run succeeded.
Impact
Every successful run on an account with overage disabled (Claude Code Max, out of overage credits) files a spurious failure issue. In our operator repo this produced false [aw] … failed reports on runs that completed normally and posted their output (a weekly telemetry digest; a dependency-review chore that filed its results).
Expected
The classifier should not set the rate-limit-error flag, and should not emit "Effective Token Budget Exhausted", when:
- the triggering
rate_limit_event has status: "allowed" (request not throttled), AND/OR
GH_AW_EFFECTIVE_TOKENS is empty (no effective-token count was computed) AND the run concluded success.
overageStatus/overageDisabledReason are account-billing signals and should not by themselves mark a successful run as failed.
Environment
- gh-aw:
v0.77.5
- engine:
claude (claude-sonnet-4-6), claude_code_version 2.1.156
- Trigger: scheduled and dependency-review workflows.
References
- Downstream false-failure reports (now closed): gominimal/min-aw#493, gominimal/min-aw#497.
- Evidence is from the conclusion-job log and the agent
rate_limit_event stream of two runs whose conclusion was success.
The conclusion job files an
[aw] … failedissue ("Effective Token Budget Exhausted" / rate-limit error) for runs that concludedsuccessand produced their intended output, when the agent stream contains arate_limit_eventwhosestatusisallowedbut whose overage metadata isrejected/out_of_credits.Root cause
The effective-token / rate-limit classifier in the conclusion job (
collect-effective-tokens/handle_agent_failurein the generated.lock.yml) setsGH_AW_EFFECTIVE_TOKENS_RATE_LIMIT_ERROR=truefrom arate_limit_eventthat did not throttle the request:The event that trips it (Claude Code stream-json,
claude_code_version 2.1.156):{"type":"rate_limit_event","rate_limit_info":{"status":"allowed","resetsAt":1782154800,"rateLimitType":"five_hour","overageStatus":"rejected","overageDisabledReason":"out_of_credits","isUsingOverage":false}}status: "allowed"means the request was served, not rate-limited.overageStatus: "rejected"/out_of_creditsonly reports that the account has overage disabled — it is account-billing metadata, not a throttle on this run. The classifier conflates "an event mentioning overage rejection exists" with "the run hit an effective-token budget limit," and emits a failure report even thoughGH_AW_EFFECTIVE_TOKENSis empty and the run succeeded.Impact
Every successful run on an account with overage disabled (Claude Code Max, out of overage credits) files a spurious failure issue. In our operator repo this produced false
[aw] … failedreports on runs that completed normally and posted their output (a weekly telemetry digest; a dependency-review chore that filed its results).Expected
The classifier should not set the rate-limit-error flag, and should not emit "Effective Token Budget Exhausted", when:
rate_limit_eventhasstatus: "allowed"(request not throttled), AND/ORGH_AW_EFFECTIVE_TOKENSis empty (no effective-token count was computed) AND the run concludedsuccess.overageStatus/overageDisabledReasonare account-billing signals and should not by themselves mark a successful run as failed.Environment
v0.77.5claude(claude-sonnet-4-6),claude_code_version 2.1.156References
rate_limit_eventstream of two runs whose conclusion wassuccess.