Skip to content

[aw-failures] [aw-fix] P1: Copilot CLI exits 1 (partial_execution) after post-result watchdog — daily report workflows exhaust r [Content truncated due to length] #46481

Description

@github-actions

Fix the Copilot CLI post-result termination — the agent keeps issuing bash commands after producing its result, the 20s inactivity watchdog kills it with exit 1, and all 4 retries fail identically, so the daily reports never post.

Two scheduled report workflows fully failed in the last 6h with zero safe-output items emitted. Firewall diff shows no network anomalies and the harness explicitly rules out CAPI/model errors — this is a Copilot CLI (v1.0.70) clean-shutdown defect, distinct from #44298 (hang-on-exit) and #46326 (CAPI 400 model).

Affected workflows and runs

Workflow Run Failed step Result
Daily Security Observability Report §29651417530 (representative) Execute GitHub Copilot CLI exit 1, 30.2m, 119.2 AIC, 0 safe outputs
Daily Issues Report Generator §29648548749 (co-occurring, same engine/step) Execute GitHub Copilot CLI exit 1

Comparator (nearest prior run, same workflow): §29595547699.

Probable root cause

After the agent produced its work (uploaded chart assets via upload_asset), the model kept issuing exploratory bash commands (agenticworkflows --help, agenticworkflows logs --firewall ...) instead of terminating. The copilot-harness arms a post-result watchdog (inactivityTimeout=20000ms); the session never signals clean completion and the process exits 1, classified failureClass=partial_execution with hasOutput=true. The harness retries the entire run 4×; every attempt reproduces the same partial_execution exit, retries are exhausted, and no final report safe-output is emitted.

Evidence (agent-stdio.log, run 29651417530)
[copilot-harness] attempt 1 failed: exitCode=1 failureClass=partial_execution isCAPIError400=false isModelNotSupportedError=false isHTTP400ResponseError=false isSDKSessionIdleTimeoutError=false hasOutput=true retriesRemaining=3
[copilot-harness] attempt 1: post-result watchdog armed inactivityTimeout=20000ms
... (attempts 2,3,4 identical) ...
[copilot-harness] attempt 4 failed: exitCode=1 failureClass=partial_execution ... retriesRemaining=0
[copilot-harness] all 3 retries exhausted — giving up (exitCode=1)
[copilot-harness] done: exitCode=1 totalDuration=11m 48s
Process exiting with code: 1
  • audit safe_output_summary: total_items: 0 (no report posted)
  • audit session_analysis: timeout_detected: false
  • audit-diff vs 29595547699 firewall: has_anomalies: false, 0 new/removed/status-changed domains → not a network/model regression
  • Last agent action before death: agenticworkflows logs --firewall true --start_date "-7d" --count 100

Proposed remediation

  1. Treat partial_execution + hasOutput=true where safe-output items were already produced as a success-with-late-activity, not a retryable failure — finalize the run on the emitted outputs instead of retrying the whole session.
  2. When the post-result inactivity watchdog fires, terminate the copilot SDK session gracefully with exit 0 if valid safe outputs exist, rather than propagating exit 1.
  3. Tighten the prompt/stop-conditions for these report workflows so the agent emits its final safe-output report and stops, rather than running additional agenticworkflows inspection commands after its deliverable is ready.

Success criteria

  • Daily Security Observability Report and Daily Issues Report Generator complete with conclusion: success and emit their report safe-output (>=1 item).
  • No all retries exhausted — giving up on runs that already produced safe outputs.
  • AIC per run returns to baseline (the 119 AIC here reflects 4 full re-runs).

Parent: #46171
Related to #46171

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

  • expires on Jul 25, 2026, 11:24 AM UTC-08:00

Metadata

Metadata

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions