Add Agent Job Health Monitor to own fleet-wide agent-job failure rate - #52108
Merged
pelikhan merged 2 commits intoAug 11, 2026
Conversation
…lure rate Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Investigate 49% agent-job failure rate in 210-run sample
Add Agent Job Health Monitor to own fleet-wide agent-job failure rate
Aug 11, 2026
pelikhan
approved these changes
Aug 11, 2026
pelikhan
marked this pull request as ready for review
August 11, 2026 17:00
pelikhan
deleted the
copilot/deep-report-investigate-agent-job-failures
branch
August 11, 2026 17:00
Contributor
There was a problem hiding this comment.
Pull request overview
Adds daily fleet-wide monitoring for agent-job failures, addressing the ownership gap identified in #52093.
Changes:
- Measures run- and workflow-weighted failure rates.
- Classifies tracked versus novel failure clusters and records trends.
- Publishes reports through safe outputs and updates workflow documentation.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/agent-job-health.md |
Defines the new health-monitor workflow. |
.github/workflows/agent-job-health.lock.yml |
Compiled GitHub Actions workflow. |
docs/src/content/docs/agent-factory-status.mdx |
Adds the monitor to the workflow catalog. |
Review details
Tip
Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Suppressed comments (4)
.github/workflows/agent-job-health.md:48
- An empty
noopconfig defaultsreport-as-issuetotrue, so a no-runs result will create/comment on the repository’s no-op-runs issue. That contradicts the later rule that issues are emitted only for qualifying novel clusters. Disable issue reporting for this expected no-op path.
noop:
.github/workflows/agent-job-health.md:77
aw_info.jsondoes not contain eitherstatusortotal_tokens; it is generated before the agent job runs. The downloadedrun_summary.jsonis the file that contains run metadata andjob_detailswith job/step conclusions. Pointing the agent at nonexistent fields can make it miss failures or issue an unnecessary MCP query for every run.
Logs for the last 24 hours are pre-downloaded to `/tmp/gh-aw/aw-mcp/logs/`. Each `run-<id>/aw_info.json` holds run metadata (`workflow_name`, `engine_id`, `status`, `total_tokens`).
.github/workflows/agent-job-health.md:108
- A workflow-name match alone does not establish that an issue tracks this failure mode. Any unrelated open issue mentioning a workflow would cause all of its new failures to be classified as tracked, suppressing qualifying novel-cluster issues. Require confirmation that the candidate issue covers the same signature, failing step, or root cause.
- **Tracked** — the workflow or the error signature already has an open issue. Search open issues with the GitHub tools (for example by workflow name, by the error signature, and for known chronic-failure workflows such as PR Sous Chef, Issue Monster, and Contribution Check, and for the Copilot CLI segfault). Record the issue number next to each cluster.
.github/workflows/agent-job-health.md:124
- Appending unconditionally creates duplicate records whenever this dispatchable workflow is rerun on the same UTC date. The next run can then compare against another same-day sample rather than the prior day, so the advertised day-over-day signal is incorrect. Upsert by date and compare against the latest earlier calendar date.
Persist a daily record so regressions are detectable over time. Append one JSON line to `/tmp/gh-aw/cache-memory/agent-job-health/history.jsonl` (create the directory first):
- Files reviewed: 2/3 changed files
- Comments generated: 1
- Review effort level: Balanced
| with: | ||
| title-prefix: "[agent-job-health] " | ||
| expires: 3d | ||
| - shared/aw-logs-24h-fetch.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Safe Output Health Monitor's 2026-08-11 audit found 103/210 runs (49%) had an
agent-job failure, but flagged it as out of scope and recommended routing to "whichever workflow owns agent-job health monitoring" — no such owner exists. Safe Output Health covers only safe-output jobs, Detection Analysis Report only detection jobs, and Agent Performance Analyzer reports per-workflow quality rather than the aggregate fleet rate, so the 49% figure has no recurring home and no way to be confirmed or refuted over time.Adds
.github/workflows/agent-job-health.md(plus compiled.lock.yml), a daily workflow that takes that ownership.Measurement
agent_failures / total_runs) and workflow-weighted (median/mean per-workflow rate, each workflow counted once). A large gap is the direct signal that chronic offenders like PR Sous Chef or Issue Monster dominate the headline number rather than a genuine fleet-wide regression — the skew hypothesis in the issue.Triage
Execute Claude Code CLI,Execute GitHub Copilot CLI,Ingest agent output).Outputs
noopwhen no runs exist; explicit instruction to state when the sample is <20 runs.Reuses the existing
shared/daily-audit-base.md+shared/aw-logs-24h-fetch.mdstack, matching Safe Output Health.Notes for reviewers
docs/src/content/docs/agent-factory-status.mdxis generated bymake generate-agent-factory, but the committed file appears stale — regenerating produces ~20 unrelated row changes (engines committed asclauderegenerate ascrush/goose/opencode, and several workflows are absent entirely). I reverted that drift and inserted only the new row by hand, matching the generator's output format. A separate regeneration commit is probably warranted.