Antigravity diagnosed a red Harness CI build from the IDE. A Worker Agent fixed the code and pushed a commit. CI verified it: 49 of 49 tests passed.

TL;DR
- The failure explanation belongs where the developer already is. With Harness MCP inside Google Antigravity, a red CI run became a root-cause answer in the IDE, not a tab-switching hunt across GitHub and the pipeline dashboard.
- Understanding a failure and recovering from one are different problems. The Worker Agent closed the gap by proposing a fix, pushing a commit, and letting CI verify it on the same PR.
- Treat the Worker Agent as a repair attempt that still has to pass CI. On a deliberate one-line regression, it fixed the code and ran 49 of 49 tests green. On flaky or multi-file failures, keep the human reviewer in the loop.
A controlled experiment with Google Antigravity, the Harness Software Delivery Agent, and the CI Failure Autofix Worker Agent. One deliberate regression. One red PR. Two agents, one loop.
TL;DR: Antigravity diagnosed the failure from the IDE using Harness MCP. The Harness Worker Agent fixed the code and pushed a commit. The most important part: the agent verified this change; this was also verified using CI’s deterministic steps: all 49 tests passed.
AI coding agents have moved from occasional helper to daily tool. In the 2026 Stack Overflow Developer Survey, 80% of respondents reported using AI tools at least an hour a day. You can ask an agent to implement a feature, refactor a service, write tests, and help prepare a pull request. But the workflow changes once that pull request reaches CI. A build fails. A test breaks. Now you are switching between the coding environment, GitHub, and your CI dashboard to figure out what happened.
The coding agent helped you write the changes. Who is watching what happens after you push them?
That is what I wanted to explore.
The setup was a checkout application built in Google Antigravity, connected to the Harness Software Delivery Agent, with a controlled regression introduced into an existing pull request. First, Antigravity investigated the failure. Then a CI Failure Autofix Worker Agent was wired into the pipeline to attempt the repair when CI failed again. The result was a real code fix, an agent-generated Git commit, and a new CI run that passed all 49 tests.
Here is how it unfolded.
It started with a pull request in Antigravity
The application was a small e-commerce checkout built in Google Antigravity using Node.js and TypeScript, with Vitest covering the important checkout operations: cart management, discounts, shipping calculations, catalog operations, and order creation. Nothing particularly complicated.
A sample repository had an open pull request on a feature branch. On the delivery side, a Harness pipeline ran whenever that PR was opened or updated.
The pipeline performed the usual checks:
- Set up Node.js.
- Installed dependencies using
npm ci. - Ran ESLint.
- Built the TypeScript application.
- Executed the Vitest suite and published JUnit test results.
The baseline was clean, with all 49 tests passing. Then a regression went into the checkout service. This was not a random failure or a broken CI environment. I deliberately changed one line of application logic to see how Antigravity and the Software Delivery Agent would respond to an actual test failure.
The checkout bug
The application offered free standard shipping when the eligible subtotal reached $50. Consider a cart with a $65 subtotal and a $20 discount. After the discount, the subtotal is $45. That means the order should no longer qualify for free standard shipping, so a $5 shipping fee should apply.
The changed checkout logic was passing the original subtotal into the shipping calculation:
const shippingCalc = this.shippingService.calculateShipping({
methodId: request.shippingMethodId,
subtotal: cart.subtotal,
totalWeightGrams: cart.totalWeightGrams,
promoFreeShipping,
});That meant the shipping service saw $65 instead of $45. The result: it incorrectly granted free shipping. The Software Delivery Agent caught the regression.
FAIL CheckoutService
> handles shipping threshold recalculated
against discounted subtotal
AssertionError: expected +0 to be 5
Tests: 48 passed, 1 failed (49 total)The installation, lint, and build steps had completed successfully. The problem was in the application's business logic, and the failing test exposed it.

Instead of opening more tabs, I asked Antigravity
The point of starting here was to see what the developer experience looks like when Harness delivery context lives directly inside the coding environment. The Harness integration for Google Antigravity provides access to Harness MCP tools, so Antigravity can inspect pipeline executions and investigate failures without relying entirely on whatever happens to exist in the local workspace.
Rather than opening the failed test logs and tracing the code by hand, a fresh Antigravity conversation got this prompt:
Hey, I just pushed some changes to my checkout application, and my Harness CI pipeline is failing. Can you check what went wrong and help me get it working again? Before changing anything, tell me what failed, why it happened, and how you'd fix it.
The prompt deliberately withheld which line had changed. Antigravity used the Harness MCP integration to identify the failed execution and inspect it, examined the repository changes, reviewed the relevant checkout logic, and reproduced the failing test locally. It identified the issue: shipping eligibility was being calculated using the original cart subtotal rather than the discounted subtotal. It even proposed the correct one-line fix.

That turned a red CI execution into an actionable explanation without manually piecing together the pipeline logs and application code.
This is also where the distinction between understanding a failure and recovering from one became interesting. Antigravity could explain the issue and help apply the fix, but it still needed a human to ask it to investigate, review the recommendation, apply the change, and push another commit.
"What if the CI pipeline could handle that repair attempt automatically?"
What if the next red build could trigger its own repair?
There is an important difference between asking a coding agent to fix something and having an agent participate in the delivery workflow. In the first case, the developer notices a failure and starts the conversation. In the second, CI detects the failure and initiates the repair attempt. That is the behavior worth testing.
The Software Delivery Agent supports Worker Agents that run as part of a pipeline. Depending on their configuration and available tools, these agents can inspect context, reason about a task, and take authorized actions. The CI Failure Autofix Worker Agent from the worker-agents marketplace fits this case.
I did not create a separate application, repository, or pipeline. I added the agent to the existing Build and Test stage, immediately after the test step. The idea was straightforward: if the test step fails, give the Worker Agent an opportunity to investigate the failure and fix the relevant code.
The agent was configured with a Harness-managed LLM connector, access to the source repository, and the execution context it needed to identify the pipeline and PR branch. Most importantly, I configured conditional execution so Autofix would run when the stage encountered a failure. The relevant condition in my pipeline was:
if: <+OnStageFailure>
The step itself was a single block in the Build and Test stage:
- name: CI Failure Autofix
id: CI_Failure_Autofix
if: <+OnStageFailure>
template:
uses: autofixAgent
with:
llm_connector: account.harnessLlm
model_name: auto
mcp_connectors: [account.sd_github_mcp]
execution_id: <+pipeline.executionId>
source_pipeline_id: <+pipeline.identifier>
repo: shibam17/antigravity-ci-autofix-lab
branch: <+trigger.sourceBranch>With this in place, the existing CI checks remained unchanged. A successful test run would continue without requiring Autofix. A failing run could invoke the Worker Agent.
This was not Antigravity directly instructing Autofix to make changes. Antigravity and the Worker Agent had different responsibilities: Antigravity was the developer's interface to Harness, while Autofix ran inside the CI workflow.

Putting Autofix to the test
With the Worker Agent configured, I kept the same regression in the open PR and triggered a new CI execution. This was a controlled experiment: the goal was to verify the failure-to-repair path against a known, reproducible bug, not to introduce another unrelated problem.
The pipeline started normally. Dependencies installed. Lint passed. The TypeScript build passed. Then the test step failed again.
Test Files 1 failed | 4 passed (5)
Tests 1 failed | 48 passed (49)So far, exactly what I expected. This time, the pipeline did not stop at the failing test. The conditional execution worked, and the Software Delivery Agent started the CI Failure Autofix Worker Agent. That was the first meaningful result: the Worker Agent actually executed after the red test step.
What the agent did
The agent attempted to retrieve execution and failure details through Harness MCP. One detail is worth calling out: its first diagnostic request could not analyze the current execution because the pipeline was still running. Subsequent log retrieval encountered a storage-access error. Rather than stopping there, the agent used the checked-out repository to reproduce the failure. It ran the application's build and test commands, inspected the failing assertion, compared the relevant checkout logic, and examined the earlier code change.
It then arrived at the same root cause Antigravity had identified in the earlier investigation. The regression had changed the subtotal passed into ShippingService.calculateShipping(). The shipping threshold was being evaluated against the wrong value.

The agent applied the following correction to src/services/checkout-service.ts:
const shippingCalc = this.shippingService.calculateShipping({
methodId: request.shippingMethodId,
- subtotal: cart.subtotal,
+ subtotal: discountedSubtotal,
totalWeightGrams: cart.totalWeightGrams,
promoFreeShipping,
});One line changed. No test was deleted or weakened. No shipping rule was bypassed. The application logic was corrected to match the behavior already expected by the test suite.

But did the agent verify its own fix?
Yes. Before committing, the Worker Agent ran the project's validation commands again:
npm run build
npm run lint
npm run testAll three completed successfully. The complete test suite passed:
Test Files 5 passed (5)
Tests 49 passed (49)The agent then created a commit containing the targeted source-code change and pushed it to the existing pull-request branch. The commit was:
4c144d1
Autofix: harness-auto-fix created this fixIt did not open a separate fix PR or merge anything into main. It updated the feature branch belonging to the original pull request, leaving the change available for normal review.

The most important part: CI ran again
A fix is not verified simply because an AI agent says it has corrected the code. The code needs to pass the same checks that caught the problem. When the Worker Agent pushed commit 4c144d1, GitHub generated another pull-request update event. The existing Harness PR trigger picked it up and started a fresh CI execution. That new execution ran the normal build-and-test workflow against the updated PR.
Here is the result from the two executions:
| Failure and Autofix execution | Verification execution | |
|---|---|---|
| CI run | #10 | #11 |
| Tests | 48 passed, 1 failed | 49 passed, 0 failed |
| Autofix | Executed and pushed fix | Skipped because tests passed |
| Final execution status | Aborted after the new PR update triggered auto-abort | Success |
The first execution had already run Autofix and pushed the repair before being marked Aborted. That final status was a consequence of the PR trigger's auto-abort setting, not a failed code repair. The second execution provided the definitive result: the Software Delivery Agent completed successfully, with all 49 tests passing. The Worker Agent did not need to run again: the test stage was green.

Back to the IDE: closing the loop with Antigravity
The point of starting inside Antigravity was to stay in one place for the full round trip. With run #11 green, the next question was still a developer question, not a dashboard question:
Did my latest commit on feature/checkout-improvements actually pass?
The same Harness MCP integration from earlier identifies the pipeline, fetches the most recent execution, and reports back: ANwxY6rBRsKJQ7LMa_n5UA, Success, 49 of 49 tests passing, triggered by commit 4c144d1. No tab switch, no execution ID to copy.
Antigravity is not only the way into the problem. It is also the way out. The round trip:
- Developer notices a failing PR. Asks Antigravity what went wrong.
- Antigravity uses Harness MCP to pull the failing execution and explain the root cause.
- The CI Failure Autofix Worker Agent runs on the next failing execution and pushes a commit with the fix.
- The PR trigger starts a new execution against the Autofix commit.
- The developer asks Antigravity whether the latest commit passed. Antigravity confirms the green run.
The two agents never spoke to each other. They did not need to. They shared the same repository, pipeline, and source of truth about executions.
What this changes for a developer using AI coding agents
Three distinct jobs, three distinct agents:
- Antigravity explained the failure. A natural-language question about a CI pipeline returned an explanation grounded in the actual execution and application code.
- The Worker Agent attempted the repair. The next failing execution invoked it automatically. It reproduced the issue, applied a targeted fix, validated locally, and pushed a commit.
- The Software Delivery Agent verified the result. The new commit triggered another pipeline execution. The test suite passed.
The two agents work on different sides of the same loop: the coding agent lets developers interrogate delivery from the IDE; the Worker Agent lets delivery respond to failures without waiting for a human to open a conversation. The code change still sat on an open PR branch. Nothing auto-merged. Passing tests did not replace human review.
A few lessons from the experiment
The happy path worked. A few boundaries matter before applying the same pattern to a production repository.
Autofix is a repair attempt, not a guarantee. The agent fixed one reproducible regression. That does not establish how often it would succeed across unrelated failures or complex applications. Pair it with short-lived, repo-scoped credentials.
Avoid uncontrolled repair loops. If an agent commits an unsuccessful fix and that commit triggers another failing run, it could attempt further repairs repeatedly. Cap remediation attempts, or guard against Autofix acting on its own commits.
Keep independent validation in place. The useful outcome was not the agent's message saying the bug was fixed. It was the next Harness execution running the complete test suite and returning green.
The bigger takeaway
AI coding agents have made writing code faster. Getting code through CI still involves a separate set of questions: did the change build, which test failed, does the proposed fix actually work?
The Harness integration inside Google Antigravity brings those delivery questions into the coding environment. A Harness Worker Agent takes it one step further: CI can attempt to resolve a failure and submit the change for review, rather than only reporting that something went wrong.
The objective is not to eliminate human judgment or assume every red build can be repaired automatically. It is to reduce the repetitive investigation and repair work that demands a developer's immediate attention.
The coding agent found the problem. The Worker Agent fixed the code. CI verified the result.
Try the same pattern on your next failing PR: github.com/harness/harness-antigravity, import it as a pipeline in your Harness account, and add the CI Failure Autofix Worker Agent to your Build and Test stage.
Explore further



