Skip to content

[aw-failures] [aw-fix] Bound the Copilot CLI safe-output retry loop — fast-fail on repeated -32602 empty-argument rejections instead of 15-min [Content truncated due to length] #43553

Description

@github-actions

Problem statement

Abort the Copilot CLI agent turn when it loops on rejected write-once safe-output tool calls — this loop is burning the full 15-minute action timeout and is the top failure signature (10 red runs / 6h). The agent repeatedly issues empty-argument safeoutputs tools/call probes, each rejected with Error [-32602]: Empty arguments are not allowed, and never recovers, so the Execute GitHub Copilot CLI action is killed by GitHub's 15-minute step timeout with no safe output emitted.

Affected workflows and run IDs

  • PR Code Quality Reviewer (8): 28740795656, 28740785171, 28740755674, 28735756664, 28734734127, 28734706324, 28734262314, 28734041366
  • Impeccable Skills Reviewer (1): 28740755671
  • Matt Pocock Skills Reviewer (1): 28740755672

All sampled runs (5/10) share the identical terminal annotation: The action 'Execute GitHub Copilot CLI' has timed out after 15 minutes.

Probable root cause

The agent treats write-once safe-output tools as discoverable and probes them with empty arguments. The -32602 rejection is advisory (points to tools/list), so the agent retries indefinitely rather than failing fast. audit-diff (base 28740795656 vs success 28737497728) shows no firewall anomaly and no rate-limit pressure, confirming an agent-side control-flow hang, not infrastructure.

Proposed remediation

  1. Add a bounded-retry / circuit-breaker around safe-output tool invocation: after N consecutive -32602 empty-argument rejections for the same tool, stop retrying and either emit noop or terminate the turn with a non-zero exit before the 15-minute action ceiling.
  2. Make the -32602 rejection terminal-hint stronger (e.g., "do not retry with empty arguments; call tools/list once or noop") so the agent stops probing.
  3. Consider lowering the per-step timeout or adding an internal watchdog so a stuck agent fails fast (minutes, not 15) and frees the runner.

Success criteria / verification

  • No Execute GitHub Copilot CLI step in reviewer workflows exceeds the timeout due to repeated -32602 empty-argument loops.
  • A run that would previously loop now terminates within a bounded window and emits either a real safe output or noop.
  • 24–48h after deploy: reviewer-workflow timeout rate drops from ~10/6h to ~0; re-run audit-diff on a previously-looping workflow confirms clean turn completion (non-zero token usage recorded).

Parent report: #43552 · Analyzed runs: 28740795656, 28740755671, 28735756664
Related to #43552

Generated by 🔍 [aw] Failure Investigator (6h) · 290 AIC · ⌖ 21.1 AIC · ⊞ 5.2K ·

  • expires on Jul 12, 2026, 5:25 AM 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