Next-Gen App & Browser Testing Cloud
Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

The diagnosis loop, the workflow_run architecture, guardrails against a hidden regression, and what still needs a human to decide.

Mythili Raju
Author

Shahzeb Hoda
Reviewer
Published on: August 27, 2026
GitHub's own documentation puts a hard number on how far an agent can chase a CI failure through automation alone: you cannot chain more than three levels of workflow_run together. Explore, classify, fix, and the pipeline is already near the ceiling.
That limit is a useful frame for the whole idea. Agent-native CI is not "an agent also runs in the pipeline now." It is a specific, bounded change to what happens between a red check and a human's first look at it.
This covers what actually changes, the classification a triage step needs, the workflow_run architecture that wires it together, the guardrails that keep an agent from hiding a regression, and what none of this fixes.
TL;DR
Agent-native CI means an agent reads a failed run's artifacts, classifies why it failed, and drafts a diagnosis or a fix as a pipeline step, instead of a red notification just sitting there until a human opens it. The merge decision stays human in every credible version of this pattern.
Not the speed of the eventual fix. Which step a human is doing.
In a conventional pipeline, a human opens a red check, reads a log, forms a hypothesis, and only then starts fixing. Agent-native CI moves the first three steps, reading, classifying, and hypothesizing, onto the agent. The human's first look at the problem is already a diagnosis with evidence attached, not a wall of log text.
A Slack message that says a build failed is a notification. It tells you something happened. It does not tell you why.
The gap between those two is where an agent earns its place in the pipeline, and it depends entirely on what evidence the agent can actually reach. A plain-text log forces the same reconstruction work a human would do, just performed by a model instead. Structured artifacts, screenshots, a HAR network log, console output tied to the exact failing step, let the agent skip reconstruction and go straight to classification.
Kane CLI from TestMu AI builds this pattern into every run rather than leaving it to whoever wires the pipeline. Each run seals an evidence pack, per-step screenshots, a HAR network log, console NDJSON, and a structured failure record, into one file under .testmuai/evidence/. That pack is what an agent-native triage step should be reading: not a log to parse, but a record already shaped for classification.
A useful classification separates what needs a code fix from what needs nothing but a rerun.
| Class | What it means | What should happen next |
|---|---|---|
| Application bug | The feature genuinely behaves wrong | Draft a fix as a PR for human review |
| Test issue | The check itself is wrong or stale | Flag for a human to correct the assertion, never auto-edit it |
| Infrastructure | Runner, network, or environment failure | Retry automatically, no human needed |
| Configuration | A secret, credential, or setting is wrong | Surface the specific misconfiguration, not a generic error |
TestMu AI's HyperExecute already runs a version of this classification in production. It collects Selenium logs, network logs, console logs, screenshots, and video for every test, and its AI root cause analysis reads that evidence to name a cause, the same job a custom agent-native triage step would otherwise have to build from scratch.
GitHub's events-that-trigger-workflows documentation defines workflow_run as firing "when a workflow run is requested or completed," which is what lets a triage workflow act on a test workflow's outcome instead of running blind alongside it.
on:
workflow_run:
workflows: ["Test Suite"]
types: [completed]
jobs:
triage:
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v5
with:
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}Two details in that documentation change how you should write this workflow. First, the conclusion field and the run ID are both on the event payload, so the triage job can gate on failure and fetch exactly that run's artifacts without a separate API call. Second, and easy to miss: the triggered workflow can access secrets and a write token even if the workflow that triggered it could not. That second fact is the whole reason the guardrails section below exists.
Note: TestMu AI's HyperExecute already classifies failures with AI root cause analysis, so an agent-native triage step does not have to build that from scratch. Try TestMu AI free!
Every part of this loop that ends in a pull request is optional to speed up. The merge is not optional to keep human.
This is the same line our guide to quality gates for AI pull requests draws from the other direction: an agent's own PR needs the same gate as a human's, and an agent's triage output needs the same review as a human's diagnosis would.
The failure mode worth designing around is not the agent missing a bug. It is the agent making a red check turn green without the underlying bug actually being fixed.
The scoped-token guardrail is the one teams skip most often, because it requires reading the workflow_run permissions model closely enough to notice the elevation happens at all.
A browser check fails on a pull request. The test workflow completes with conclusion failure, and the triage workflow above fires.
1. Test Suite workflow runs, a checkout-flow assertion fails, conclusion: failure
2. workflow_run fires the triage job, downloads the run's artifacts
3. Triage reads the Kane CLI evidence pack: a screenshot showing a 500 response
on POST /checkout, the HAR log confirming the same request server-side
4. Classification: application bug, not a flaky selector or infra failure
5. Triage opens a PR: "checkout POST fails with 500 after promo-code refactor,
see evidence pack for request/response detail"
6. A human reviews the PR, confirms the diagnosis, approves the fix
7. Merge re-triggers Test Suite; the original failing check now passesStep 3 is where the whole argument for artifacts-over-logs pays off. A screenshot and a matching HAR entry name the failure in one look; a plain-text log of the same failure would need the agent, or the human, to reconstruct the same conclusion from timestamps and stack traces.
Agent-native triage classifies and explains failures that a check actually caught. It has no opinion on flows nobody thought to test.
None of that is a flaw in the pattern. It is the boundary of what CI-stage triage was ever going to solve, and it is why the coverage question comes before the triage question. Our breakdown of agent-run test cost vs plain CI covers the budget side of deciding how much of a suite deserves this treatment in the first place. Start with the Kane CLI documentation to give your own triage step evidence worth reading.
Author
Mythili is a Community Contributor at TestMu AI with 3+ years of experience in software testing and marketing. She holds certifications in Automation Testing, KaneAI, Selenium, Appium, Playwright, and Cypress. At TestMu AI, she leads go-to-market (GTM) strategies, collaborates on feature launches, and creates SEO optimized content that bridges technical depth with business relevance. A graduate of St. Joseph’s University, Bangalore, Mythili has authored 35+ blogs and learning hubs on AI-driven test automation and quality engineering. Her work focuses on making complex QA topics accessible while aligning content strategy with product and business goals.
Reviewer
Shahzeb Hoda is the Associate Director of Marketing and a Community Contributor at TestMu AI, leading strategic initiatives in developer marketing, content, and community growth. With 10+ years of experience in quality engineering, software testing, automation testing, and e-learning, he has authored and reviewed 70+ technical articles on software testing and automation. Shahzeb holds an M.Tech in Computer Science from BIT, Mesra, and is certified in Selenium, Cypress, Playwright, Appium, and KaneAI. He brings deep expertise in CI/CD pipeline automation, cross-browser testing, AI-driven testing practices, and framework documentation. On LinkedIn, he is followed by 3,700+ engineers, developers, DevOps professionals, tech leaders, and enthusiasts.
Did you find this page helpful?
More Related Blogs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance