Skip to content

[aw-failures] Avenger hits max-turns: 25 invocation cap during self-repair — same pattern as #51344 #51490

Description

@github-actions

Fix it: raise max-turns: 25 (or make it adaptive) in Avenger — self-repair loops burn through the invocation cap

Problem statement: .github/workflows/avenger.md:19 hardcodes max-turns: 25. Run §31277327430 (2026-08-08 20:37 UTC) needed to self-repair a CI failure, ran 29 turns over 8m49s, and died on a non-retryable 429 Maximum LLM invocations exceeded (25 / 25) — same failure shape as #51344, different workflow, different cap value. This is the same systemic bug: a hardcoded per-run turn ceiling with no graceful-degradation path when an investigation genuinely needs more turns.

Affected workflow: Avenger (.github/workflows/avenger.lock.yml)

Run: §31277327430 — 29 turns, 8m49s, exit code 1, agent-stdio.log: API Error: Request rejected (429) · Maximum LLM invocations exceeded (25 / 25).

Note on false lead ruled out: the agent's own transcript speculated a mid-run firewall policy change blocked its gh calls and forced extra retries. audit-diff between this run and the nearest successful Avenger run (§31274850223) shows zero firewall anomalies and no change in github.com/ghapi access — the failed run actually made fewer GitHub API calls (19 vs 47) than the successful comparison run. Do not chase a firewall fix here; the cap itself is the cause.

Isolated occurrence: 1 failure out of 9 Avenger runs in the lookback window (the run immediately before and the four runs after all succeeded) — lower frequency than Design Decision Gate's 2/2, but the same root cause class.

Proposed remediation:

  1. Raise max-turns for Avenger (e.g., 40-50) to match the turn-hungry shape of self-repair/investigation tasks, consistent with the fix already proposed in [aw-failures] Design Decision Gate fails 2/2 runs — hardcoded max-turns: 20 hits invocation cap on complex PRs #51344.
  2. Prefer the shared/adaptive fix tracked in [aw-failures] Design Decision Gate fails 2/2 runs — hardcoded max-turns: 20 hits invocation cap on complex PRs #51344 (e.g., a turn budget that scales with task complexity, or graceful partial-output on cap) over a per-workflow hardcoded bump, so this class of failure stops recurring workflow-by-workflow.

Success criteria / verification:

  • Avenger runs that require extended self-repair no longer hard-fail on Maximum LLM invocations exceeded before producing output.
  • No firewall changes are made as part of this fix (ruled out above as the cause).
  • Track recurrence rate across Avenger runs post-fix; 0 invocation-cap failures over the next 2 weeks of runs.

Analyzed run: https://github.com/github/gh-aw/actions/runs/31277327430
Comparator run: https://github.com/github/gh-aw/actions/runs/31274850223
Parent tracking issue: #51344
Related to #51344

Generated by 🔍 [aw] Failure Investigator (6h) · agent · 101.9 AIC · ⌖ 41.8 AIC · ⊞ 5.5K ·

  • expires on Aug 15, 2026, 5:22 PM UTC-08:00

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions