AI agentAutomationIntegrations

A production bug comes back to the team as a ready fix, not a ticket

One agent writes a fix and a test, another reviews it independently, and a strict rule — not a model — decides whether the change goes live.

4 min read

Client
Software development company (in-house product)
Industry
DevOps / CI/CD automation
Scope
Custom systems and API integrations

Who the client was and what was getting in the way

This is our own product, built for ourselves and used every day. It came from a simple observation: many production incidents are not interesting problems. They are small things. An external service changes its response format, a website we collect data from changes its layout, or an edge case stops matching the code’s assumptions. The fix takes a dozen minutes, but before getting to it, someone has to read the report, reproduce the issue, find the relevant code, and recover the context. Those dozen minutes turn into an hour, and several hours like that add up each week.

The obvious idea — let a model write the fix — has one serious flaw. A model can write a fix and tailor a test to it that passes even though the original bug has not been fixed. It is marking its own work. We needed evidence independent of the person or agent that wrote the code.

The second issue was safety. Not every change can go live without a person. A fix affecting payments or permissions is in a different risk category from adapting to a changed data format. Third, not every incident can be fixed in code. Some are caused by external-service blocks or expired access. The agent needed to recognize these and stay quiet rather than create tickets no one could resolve.

What we built

We built a loop where one independent agent makes the fix, another verifies it, and a rule — not a model — decides whether the change can go live.

Everything starts with an event. The application where something broke sends a signal with a diagnosis and an error fingerprint, so the same incident does not start the process ten times. The loop is packaged as a reusable component in GitHub Actions, so connecting another project takes a few lines of configuration rather than a separate implementation.

The first agent, powered by Claude Code, starts by writing a test that reproduces the bug and only then makes the smallest possible fix. The order matters: first prove the problem exists, then solve it. The result is an ordinary change proposal, just like one a person would open.

A second agent runs separately and does not know how the first one reasoned. It checks one thing: whether the test fails on the old code and passes on the new code. That is the objective evidence missing when the author of a fix is also its reviewer.

At the end is a gate that is not an agent. It is a straightforward rule: if the change is low risk, the full test suite passes, and independent verification is documented, the fix goes in automatically. Otherwise, it waits for a person. A dashboard for those cases and the history of the whole loop are stored in Supabase.

How it works today

The loop is part of our daily process. When something breaks, the team does not get a ticket to investigate; it gets a ready change proposal and a test proving that the problem existed and has been fixed.

Small, recurring failures disappear without anyone getting involved. In the morning, the team can simply see that something broke yesterday and was fixed. Changes marked as sensitive wait in the dashboard for a person’s decision, and that is the only part that needs manual attention. Incidents that cannot be fixed in code are recognized and set aside instead of clogging the queue.

The outcome

Two independent agents handle each fix: one writes it, the other verifies it. Low-risk fixes go in automatically; risky ones wait for a person. Every change has hard evidence in the form of a test that failed before the fix and passes afterward.

What we would do differently

The first version had one agent write and review its own fix. It looked great until we started checking exactly what had been fixed. Splitting the roles into two independent runs was the only change that truly solved the problem of fabricated successes, and it should have been part of the design from day one.

We also underestimated how many reports involve problems that cannot be fixed in code: expired access, external-service blocks, and outages in systems owned by others. Before we added detection for these cases, the loop generated noise that made people stop looking at the results. Cause classification should come before the repair agent, not after it.

Pricing

Process discovery, an automation plan, implementations, and ongoing support. One fixed rate.

The Swarm subscription

Advisory and implementation service (B2B): we talk with your team, map processes, and suggest improvements. We agree on priorities together, implement an AI agent, automation, or internal system each month, and monitor and maintain the solutions that are in use. Billed monthly; collaboration is remote.

4 900 PLN net /mo

6 027 PLN gross (VAT 23%)

  • ✓ Conversations with your team and discovery of your company’s processes
  • ✓ A map of automation opportunities and shared prioritisation
  • ✓ A new AI agent, automation, or internal system every month
  • ✓ Monthly Kickoff & Mapping Call (45 min)
  • ✓ Implementation meeting with a demo (15–30 min)
  • ✓ 24/7 monitoring of live automations
  • ✓ Incidents fixed within 24 hours — included
  • ✓ Team training and consultations included
  • ✓ Pause or cancel without notice — by the day before the next billing period

No commitment — pause or cancel with one click.

BLIKVisaMastercardMaestro

BLIK, card, instant bank transfer, or payment by pro forma invoice. Online card payments are processed by Autopay S.A. Payment methods and refunds.

Pause without notice

Nothing in the queue? Pause your subscription by the day before the next billing period, and save any unused days for later.

One-week trial

Not feeling it after the first week? We refund 3/4 of the fee — no questions asked.

Prefer to talk?

Book a 30-minute call and see if it is right for you.

Book a call
★

Satisfaction guarantee

Not fully satisfied with the service in your first month? We refund 3/4 of the fee. In practice, you get a one-week trial of The Swarm for 1/4 of the price — 1 225 PLN instead of 4 900 PLN net.

BIG GROWTH Sp. z o.o. · ul. Lipowa 3D, 30-702 Kraków · NIP 6793284750 · REGON 527118883 · KRS 0001073383
BLIKVisaMastercardMaestro
Online payments: Paynow (mElements S.A., mBank Group) — BLIK, payment card, instant bank transfer. Online card payment services are provided by Autopay S.A. Payment currency: PLN. Prices on the Website are net prices (VAT 23%).
© 2026 The Swarm — AI automation on subscription · HeyNeuron