Beyond Git Worktree
Cloud AgentsLong read

CI Triage Automation With Coding Agents

Automated agents can triage CI failures at scale without pulling engineers into debugging.

· 10 min read
Cover illustration for “CI Triage Automation With Coding Agents”
Cloud Agents · October 12, 2026 · 10 min read · 2,180 words

A failing build on a pull request blocks the branch. Most of what breaks CI is not hard to diagnose: lint errors, type errors, flaky tests, a broken import. The volume of this work scales with team size and how often people open pull requests. More engineers means more concurrent failures, and more concurrent failures means more triage debt sitting in the queue at any given moment. CI triage is a structural problem rather than an occasional annoyance: it gets worse as a team grows, not better, and no amount of individual diligence fixes a problem whose volume scales with headcount.

The self-healing CI loop: what happens in each of its four steps

A workable response to that structural problem is not a smarter human process but a repeatable automated loop, and the loop itself has exactly four steps: detect, provision, reproduce and fix, push back to the branch. Treating those four steps with precision, rather than waving at "an AI fixes your CI," is what separates a deployment that holds up under real PR volume from an experiment that works in a demo and breaks on the first edge case.

Detection starts the loop. A build fails on a pull request, and that failure, whether it is test output, a lint report, or a type-checker error, gets emitted as a structured trigger the agent can read. On Ellipsis, the detect step is expressed as a trigger in the agent's YAML config, pulled directly into the repo and versioned like any other code, so the agent consumes structured failure events straight from CI without custom polling logic bolted on afterward. The trigger itself carries the failure context: which repo, which branch, the commit SHA, the names of the tests that failed or the specific error lines. That context matters because it means the agent starts with a scoped problem rather than a blank slate, the same way a human engineer works faster from a stack trace than from "the build is red."

Provisioning comes next, and it is where a lot of fragile implementations fail quietly. Ellipsis runs each sandbox with credentials minted fresh for that session and revoked when it completes, so the environment is both scoped to what the task needs and gone the moment the task ends.

With the sandbox ready, the agent reproduces the failure and fixes it. It runs the failing test or check inside the sandbox, confirms the failure occurs, reasons about what caused it, edits the relevant files, and re-runs the check to verify the edit resolves it.

The loop closes with push and re-trigger. No one gets pulled into the debugging phase itself. A person enters the loop only at review, which is the point where human judgment is actually the scarce resource worth spending.

Getting agents the repository context they need to fix a failure

An agent's fix is only as good as the context it starts from. An agent that sees nothing but an error message will patch the symptom in front of it. An agent that understands how the repository is structured, what its testing conventions look like, and how its modules relate to each other has a real shot at fixing the underlying cause instead.

The failure context carried in the initial trigger, the stack trace, the test name, the diff of the commit that broke things, is a starting point, but for anything beyond the most trivial failure it is not enough on its own. Fixing a real bug requires reading the surrounding files, understanding how the module fits into the rest of the codebase, and applying conventions the team already follows. That repository-level reasoning is what separates a coding agent from a script running a canned patch, and Claude Code's advantage in this same step appears in handling large codebases and sessions that run long: it traces a failure across several files before settling on a fix.

Setup hooks do similar work from a different angle. An agent that starts a session without its dependencies installed correctly will waste its first several tool calls rediscovering a problem the team already solved for every other engineer on day one.

The practical gap this creates between teams is significant. Teams that invest time writing good agent instructions and setup hooks tend to get fixes that actually pass review on the first attempt. Teams that hand the agent nothing but the raw error message get fixes that make CI green again but quietly introduce problems a reviewer catches later, or doesn't.

What the agent configuration looks like as code

Defining the agent that runs your CI triage loop is itself a design decision, and the platforms worth taking seriously treat that definition as a file in your repository, written in YAML. An agent declared this way is versioned, reviewable in a pull request, and changeable through the exact same process a team already uses for every other engineering decision: propose a diff, get a review, merge it.

That matters because of what it replaces. The alternative, an agent configured through a UI or hardcoded somewhere inside a CI script, produces a configuration that lives outside version control. An agent defined in YAML, by contrast, is a first-class artifact: anyone with repo access can read it, anyone can propose a change to it, and if it misbehaves, rolling it back is a git revert, not an archaeology project.

Ellipsis's own documentation shows what this looks like in practice. A UI-configured agent often lacks equivalents for these controls, or buries them somewhere no one thinks to check until something goes wrong.

The operational payoff appears the day something does go wrong. No tribal knowledge required, no Slack thread searching for who set this up two years ago.

Why each agent session runs in an isolated sandbox

An agent that runs directly on the CI runner host with credentials that persist beyond a single task is an open door, and a real incident shows how that door gets used. Eight days later, an unauthorized package version was live on npm, and it stayed live for roughly eight hours before being caught and deprecated, in a window where auto-updates could have pushed it to millions of developers.

That attack worked because the agent ran on the runner host itself, carrying credentials that were both persistent and broad. Neither isolation nor credential scoping stood between the hijacked agent and the npm publishing keys. Sandbox isolation breaks that chain at the provisioning step: if the agent runs inside an isolated container instead of directly on the runner, a hijacked agent has nothing it can reach beyond its own provisioned environment, no credential store, no network neighbors, nothing outside the box it was given. Ephemeral credentials break the chain at a different point entirely: a credential minted only for one session and scoped only to the repositories that session needs cannot be stolen and reused later, because it's already revoked by the time anyone would try.

Governance checklists written for agents operating inside CI pipelines converge on the same handful of requirements: short-lived tokens that default to read-only and grant write access only to specific repos and branches, execution inside a sandbox, sanitization of untrusted input so content from an issue or comment never gets interpolated directly into a prompt, and a kill switch that can stop a session. Ellipsis's security model builds these properties in directly: credentials are minted per session, scoped to whatever repos the YAML permits, and revoked the moment the sandbox closes, with the code itself deleted from the sandbox at session end. The same structural instinct appears elsewhere in the industry: NVIDIA's OpenShell, launched at GTC 2026, applies kernel-level isolation to agent execution, and Microsoft Open Source's Agent Governance Toolkit, released in April 2026, enforces runtime policy at the application layer, both governed by declarative security rules. Two separate approaches converging on the same architecture is a signal that sandbox isolation is becoming a baseline expectation for production agent infrastructure, not a feature one vendor offers to stand out.

Keeping CI triage agent costs from becoming a surprise

CI triage agents run on every pull request push, and that means their costs compound in ways a team won't notice until the bill arrives, unless cost gets treated as a property of the pipeline that gets tested, not a line item someone reviews after the fact. The lesson generalizes well beyond that one case: cost spikes in CI triage tend to come from one step injecting a lot of context on every run, not from the slow accumulation of many small, cheap sessions.

Controlling for that requires budget enforcement to live outside the agent's own code. An agent that checks its own budget can skip that check if it has a bug, deliberately or not. Dynamic downgrade rules build on top of that: once a session crosses a defined fraction of its remaining budget, it switches from a frontier model to a cheaper fallback for routine planning work; further into the budget, context gets compressed; further still, non-critical tool calls get disabled while the reads the agent actually needs stay available.

Cost is also something CI can test directly, the same way it tests anything else. Ellipsis expresses this enforcement directly inside the YAML itself, with fields like budget: session: 5 and budget: day: 50, or a budget: week: field for a trailing seven-day cap, so the limit is a version-controlled constraint sitting in the same file as the rest of the agent's configuration, not a setting on a dashboard that someone may or may not have gotten around to configuring.

What the audit trail from a triage session must contain

A triage agent that pushes a fix without leaving behind a full record of how it got there is no different from a human commit that arrives with zero context attached, and in a production engineering environment that is not an acceptable standard, even when the fix in question passes every check. Without that record, the agent is a black box, and trust in anything it produces erodes fast, because there's no way to tell a well-reasoned fix from a lucky one.

Full visibility into every tool call, every diff, every reasoning step is required for a team running agents against production code. It is the line that separates a production deployment from something still in the experimental stage. A logged session turn looks something like a record showing "type": "tool_use", "name": "Bash", "input": {"command": "pytest -k pool"}, paired with the cost of that specific call, so every action an agent takes traces back to a session, a trigger, and ultimately a person or automated process that set the whole thing in motion.

This record also underwrites how teams delegate work to agents. Many teams treat bug triage and log analysis as tasks an agent can do but a human must confirm, and that confirmation only means something if the human reviewing it can see what the agent did, including the commit it produced at the end.

Scoping the first CI triage agent to run reliably

Teams that get CI triage automation working reliably tend to start as narrow as the problem allows: one repository, one well-defined class of failure, one agent YAML file, and they expand scope only once the logs confirm the agent is behaving the way the team actually wants.

Choosing the failure class matters most at the start. Lint errors and type errors are the right place to begin because they are deterministic, the fix can be verified just by re-running the check, and a wrong fix fails CI loudly rather than passing silently and causing damage somewhere downstream. That self-correcting property is what makes the loop safe to run unattended on this class of problem before it's safe to run on anything riskier.

Scope the agent to a single repository, with read access as the default and write access limited to the specific branch it's fixing. Set the session budget before that first run, not after the first surprising bill arrives. The cost research covered earlier makes clear that one misconfigured step can dominate an entire month's spend, and the budget cap written into the YAML is the safeguard against that outcome, not an afterthought bolted on once it's already happened once.

For the first several weeks, run sessions in a mode where the agent opens a draft pull request. The log shows whether the agent read the right files, made sensible tool calls, and stayed inside its budget, and that log is precisely the evidence the adaptive governance model described earlier requires before an agent earns more autonomy.

When it's time to expand, change one dimension at a time: a second failure class, or a second repository, or a tighter budget threshold, never several at once. That way, if fix quality slips, the team knows exactly which change caused it. On Ellipsis, this entire progression maps directly onto the YAML file itself. Expanding scope later is simply a pull request against that same file, reviewed and merged the way any other engineering change would be.

Sources

  1. The Work Behind Delegation: A Framework for Supervising AI Coding Agents
Filed underCloud Agents

More in Cloud Agents