You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AgentRx normalized 29 distinct failing agentic-workflow runs (from report-failure-as-issue records across ~26 workflows in github/gh-aw) into trajectory IR and ran the deterministic invariant checker. Grouping the normalized failure telemetry by root cause, the single largest actionable cluster is terminal API errors handled by a retry storm: model-API 403 ai_credits_limit_exceeded (AI‐credit budget exhaustion) and 429 rate‐limit errors that end in engine termination. The top finding: on a terminal 403 ai_credits_limit_exceeded, the engine re‐issues the same request up to 11 times before failing — pure wasted wall‐clock/retry budget that also worsens rate‐limit pressure. gh‐aw's harness already classifies this error as non‐retryable, yet the 11‐attempt storm still occurs, proving the retries happen inside the CLI/SDK invocation, below the harness guard's reach.
AgentRx Evidence
Critical step: the model-API request step (IR step where content is tagged [CRITICAL FAILURE STEP]) returning 403 ai_credits_limit_exceeded / 429, followed by an in‐CLI retry loop.
IR summary — 29 trajectories loaded, 29 valid, 29 steps; domain auto‐detected flash; deterministic normalization (no LLM fallback needed). Each trajectory maps one failing run's session record to an ordered start → execute → [CRITICAL FAILURE STEP] sequence.
Invariant / checker highlights — deterministic checker ran across all 29 trajectories and reported 0 auto‐generated invariant violations. This is a limitation, not a clean bill of health: static/dynamic invariant generation and the LLM judge require an LLM endpoint (copilot/azure/trapi), and none was reachable in this run (copilot CLI unauthenticated + egress firewall). The static stage failed with Static invariants JSON parse failed (empty LLM response); report was skipped (No judge output to report on). Completed stages: ir, check.
Judge classification (deterministic, evidence‐derived — LLM judge unavailable) — classification was derived from the normalized IR run‐session telemetry rather than the LLM judge:
violation
evidence
fix_type
rationale
ai_credits_exhausted (4)
run 29896892294 used 1030.9/1000 credits, 403 ai_credits_limit_exceeded, retried up to 11×
429 needs exponential backoff + jitter, not immediate re‐fire
engine_failure (3 primary / 7 multi‐label)
engine terminated after API errors (predominantly 403/429)
improving retry/backoff strategy
Correct retry classifier addresses the shared upstream cause
permission (1)
run 29843908934 — permission denied
improving retry/backoff strategy
Permission‐denied is terminal; must not be retried
missing_tools (5)
run 29896126198 — "MCP toolsets unavailable in runner - tools not loaded"
precondition checks before expensive tools
Pre‐flight MCP‐reachability check fails early with a clear message
timeout (5)
run 29848004889 — cancelled after exceeding time limit
reducing token‐heavy context payloads
Trim context / split work to finish within limit
generic_failure (10)
plain "Workflow Failure", no guardrail signal
add missing telemetry attributes for triage
Undiagnosable from run‐session records alone
Known limitations — (a) LLM‐gated stages (static/dynamic/judge/report) did not run; classification is evidence‐derived. (b) Per‐turn token/turn/duration telemetry was unavailable: the agentic-workflowslogs/audit MCP tools could not download agent artifacts within the gateway's hard ~60s per‐tool deadline, so trajectories were built from report-failure-as-issue run‐session records (run id, workflow, engine, error class, credit numbers, retry counts, missing‐tool notes) — the runs[] session fields the mission prioritizes. (c) One of the 4 credit‐exhaustion runs is Daily Max Ai Credits Test, a workflow that intentionally exercises the limit; the other 3 (incl. two real Daily VulnHunter Scan runs) are genuine.
Recommended Optimization
One change — fail fast on terminal API errors instead of retrying them. Cap/disable the engine's inner HTTP‐retry budget for non‐recoverable error classes — 403 ai_credits_limit_exceeded (and the sibling quota/budget 403s) and permission‐denied — so the CLI exits immediately and hands off to the existing harness guard, rather than burning up to 11 in‐process attempts. Pair it with proper exponential backoff + jitter for genuinely transient 429.
Why highest impact: it is the largest actionable, evidence‐backed cluster (~9/29 runs, 7 multi‐label engine_failure), and the smallest meaningful change: gh‐aw already detects the credit error at the harness layer (AI_CREDITS_EXCEEDED_PATTERNS in actions/setup/js/harness_retry_guard.cjs — verified to match the real error string), so the only gap is that the retry storm occurs inside the CLI invocation before the harness sees output. Eliminating those inner retries wastes no model credits (they return 0 tokens) but saves runner‐minutes and stops the storm from amplifying 429 pressure for the rate‐limit cluster.
Where to implement:
actions/setup/js/harness_retry_guard.cjs — extend the terminal‐error guard so the non‐retryable classification is enforced against the inner retry path (and cannot be silently bypassed); add a regression case to actions/setup/js/harness_retry_guard.test.cjs.
pkg/workflow/claude_engine.go + pkg/workflow/engine_helpers.go (applyEngineHarnessRetryEnv, GH_AW_HARNESS_MAX_RETRIES / GH_AW_HARNESS_BACKOFF_MULTIPLIER) — drive the inner engine/SDK retry budget to a low value for terminal‐class errors.
Optionally the api‐proxy that emits the 403 ai_credits_limit_exceeded — return it so the CLI/SDK treats it as non‐retryable.
Validation Plan
How to confirm: on the next runs of Daily VulnHunter Scan / Daily Max Ai Credits Test, the failure log should show a single API attempt on 403 ai_credits_limit_exceeded (no attempt 1/11), with the structured "AI Credits Budget Exceeded" safe‐output still emitted.
Expected metric changes: retry‐storm runs (retry_attempts_max ≥ 5) drop toward 1; mean time‐to‐failure for the credit/permission cluster falls sharply (fewer wasted attempts / runner‐minutes); 429‐driven engine_failure runs recover more often once backoff+jitter is applied. Re‐running this AgentRx pipeline should show the improving retry/backoff strategy cluster shrink relative to the 29‐run baseline.
Executive Summary
AgentRx normalized 29 distinct failing agentic-workflow runs (from
report-failure-as-issuerecords across ~26 workflows ingithub/gh-aw) into trajectory IR and ran the deterministic invariant checker. Grouping the normalized failure telemetry by root cause, the single largest actionable cluster is terminal API errors handled by a retry storm: model-API403 ai_credits_limit_exceeded(AI‐credit budget exhaustion) and429rate‐limit errors that end in engine termination. The top finding: on a terminal403 ai_credits_limit_exceeded, the engine re‐issues the same request up to 11 times before failing — pure wasted wall‐clock/retry budget that also worsens rate‐limit pressure. gh‐aw's harness already classifies this error as non‐retryable, yet the 11‐attempt storm still occurs, proving the retries happen inside the CLI/SDK invocation, below the harness guard's reach.AgentRx Evidence
[CRITICAL FAILURE STEP]) returning403 ai_credits_limit_exceeded/429, followed by an in‐CLI retry loop.resource_budget_exhaustion/model_rate_limiting→engine_terminated_on_api_error. Fix type: improving retry/backoff strategy (fail‐fast on terminal errors).ai_credits_exhausted(4) +rate_limit(1) +permission(1) +engine_failureprimary (3) ≈ 9 of 29 failing runs (~31%);engine_failureappears on 7 runs when counted multi‐label. This is the largest actionable fix‐type group. (For comparison:missing_tools5,timeout5, unclassifiedgeneric_failure10.)29896892294— used1030.9 / 1000AI credits,403 ai_credits_limit_exceeded,attempt 1/11; run29826783727—attempt 1/11; run29874295528—429→ engine failure, 5 attempts.29896892294,29826783727(Daily VulnHunter Scan);29874295528(Daily BYOK Ollama Test).AgentRx Artifacts
IR summary — 29 trajectories loaded, 29 valid, 29 steps; domain auto‐detected
flash; deterministic normalization (no LLM fallback needed). Each trajectory maps one failing run's session record to an ordered start → execute →[CRITICAL FAILURE STEP]sequence.Invariant / checker highlights — deterministic checker ran across all 29 trajectories and reported 0 auto‐generated invariant violations. This is a limitation, not a clean bill of health: static/dynamic invariant generation and the LLM judge require an LLM endpoint (
copilot/azure/trapi), and none was reachable in this run (copilot CLI unauthenticated + egress firewall). Thestaticstage failed withStatic invariants JSON parse failed(empty LLM response);reportwas skipped (No judge output to report on). Completed stages: ir, check.Judge classification (deterministic, evidence‐derived — LLM judge unavailable) — classification was derived from the normalized IR run‐session telemetry rather than the LLM judge:
Known limitations — (a) LLM‐gated stages (static/dynamic/judge/report) did not run; classification is evidence‐derived. (b) Per‐turn token/turn/duration telemetry was unavailable: the
agentic-workflowslogs/auditMCP tools could not download agent artifacts within the gateway's hard ~60s per‐tool deadline, so trajectories were built fromreport-failure-as-issuerun‐session records (run id, workflow, engine, error class, credit numbers, retry counts, missing‐tool notes) — theruns[]session fields the mission prioritizes. (c) One of the 4 credit‐exhaustion runs isDaily Max Ai Credits Test, a workflow that intentionally exercises the limit; the other 3 (incl. two real Daily VulnHunter Scan runs) are genuine.Recommended Optimization
One change — fail fast on terminal API errors instead of retrying them. Cap/disable the engine's inner HTTP‐retry budget for non‐recoverable error classes —
403 ai_credits_limit_exceeded(and the sibling quota/budget 403s) and permission‐denied — so the CLI exits immediately and hands off to the existing harness guard, rather than burning up to 11 in‐process attempts. Pair it with proper exponential backoff + jitter for genuinely transient429.engine_failure), and the smallest meaningful change: gh‐aw already detects the credit error at the harness layer (AI_CREDITS_EXCEEDED_PATTERNSinactions/setup/js/harness_retry_guard.cjs— verified to match the real error string), so the only gap is that the retry storm occurs inside the CLI invocation before the harness sees output. Eliminating those inner retries wastes no model credits (they return 0 tokens) but saves runner‐minutes and stops the storm from amplifying 429 pressure for the rate‐limit cluster.actions/setup/js/harness_retry_guard.cjs— extend the terminal‐error guard so the non‐retryable classification is enforced against the inner retry path (and cannot be silently bypassed); add a regression case toactions/setup/js/harness_retry_guard.test.cjs.pkg/workflow/claude_engine.go+pkg/workflow/engine_helpers.go(applyEngineHarnessRetryEnv,GH_AW_HARNESS_MAX_RETRIES/GH_AW_HARNESS_BACKOFF_MULTIPLIER) — drive the inner engine/SDK retry budget to a low value for terminal‐class errors.403 ai_credits_limit_exceeded— return it so the CLI/SDK treats it as non‐retryable.Validation Plan
Daily VulnHunter Scan/Daily Max Ai Credits Test, the failure log should show a single API attempt on403 ai_credits_limit_exceeded(noattempt 1/11), with the structured "AI Credits Budget Exceeded" safe‐output still emitted.retry_attempts_max≥ 5) drop toward 1; mean time‐to‐failure for the credit/permission cluster falls sharply (fewer wasted attempts / runner‐minutes);429‐drivenengine_failureruns recover more often once backoff+jitter is applied. Re‐running this AgentRx pipeline should show theimproving retry/backoff strategycluster shrink relative to the 29‐run baseline.References
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
awmgmcpgSee Network Configuration for more information.