I Stopped Running Every Unit Test in CI. Here's Why.

Not out of ignorance, and not because I underestimate tests: I ran out of compute. With agents opening more pull requests in a day than I used to write in three months, I chose speed in the PR loop and moved the full suite, more than an hour long, to a nightly build. The real lesson is about where the SDLC bottleneck goes next.

For years I treated one rule as non-negotiable: every pull request runs every test. A green build meant the whole suite had passed, on that exact commit, before merge. I have defended that rule in architecture reviews and written it into engineering handbooks.

I recently stopped following it on my own projects.

I didn’t drop it because I underestimate testing. I know what a regression costs once it reaches production, and I know what a slowly decaying test suite costs. I dropped it for a duller reason: I didn’t have enough compute to keep running it. The full unit suite now runs once a day, in a nightly build that takes more than an hour, and the PR pipeline runs a faster, targeted subset.

In What If the Bottleneck Is No Longer the Developer Machine, but the Runners? I did the arithmetic of why CI fleets saturate when agents push. This post is the field note that comes after: what I actually gave up, how I bounded the risk, and why I now think the hard problem of agentic delivery is no longer producing code but channeling it.

What changed: the volume

I now work with a team of specialized AI agents: requirements, architecture, implementation, QA, DevOps, security, observability. I give them intent, constraints and context, as described in Intent First, and they ship.

The result surprised me even though I sell this way of working: I now open more pull requests in a single day than I used to produce in three months of solo development.

That follows from how agentic work is built:

  • Many agents work in parallel, each on a narrow task.
  • Each task ends as a small, reviewable PR, which is the discipline we want.
  • Agents iterate. A review comment or a red check triggers a new push, and every push triggers a pipeline.

Small batches are good engineering. But many small batches, each running a pipeline that takes more than an hour, add up quickly.

Illustration of a tired engineer at a desk behind a towering stack of folders that small robots keep adding to, while a server cabinet next to the desk overheats
The agents keep shipping. The CI server keeps sweating. Illustration: AI-generated (FLUX 2 Klein 9B via RunComfy).

The bottleneck moved

In a classic SDLC, the scarce resource is human time spent writing code, and the rest of the pipeline is sized around it. CI capacity is generous compared with how often people push. Reviews are slow but rare enough to keep up.

In an agentic SDLC, writing code becomes cheap and parallel. The constraint moves downstream, a point I first made in Anthropic’s AI-Native SDLC Explained.

Two delivery pipelines. Classic SDLC: Discover, Architect, Build, Test, Deploy, with Build, paced by humans, as the bottleneck. Agentic SDLC: the same steps, Build is done by agents in parallel, and the bottleneck moves to Test, Review and Guardrails, which are bound by compute and attention.CLASSIC SDLCthe constraint is human authoringDiscoverArchitectBuildhuman-pacedBOTTLENECKTestDeployAGENTIC SDLCthe constraint moves to verificationDiscoverArchitectBuildagents, in parallelTest · ReviewGuardrailscompute + attentionBOTTLENECKDeploy
The bottleneck moves: in a classic SDLC humans writing code set the pace; with agents building in parallel, test, review and guardrails become the constraint

This is Goldratt’s theory of constraints applied to software delivery: speeding up a step that is not the bottleneck adds no throughput, only work in progress. Agents sped up authoring, so the queue now builds up in front of verification.

Illustration of a large funnel overflowing with robots carrying code folders, its narrow neck jammed, above a single reviewer with a magnifying glass checking one document at a time
More production upstream doesn't widen the neck of the funnel. Illustration: AI-generated (FLUX 2 Klein 9B via RunComfy).

Guardrails and reviews are compute too

The part people tend to miss is that governance isn’t free. In an agentic delivery model, every safeguard runs on the same factory floor as production:

  • Guardrails (lint, type-check, unit and integration tests, SAST, dependency and secret scanning, licence checks, performance budgets) are CI jobs and consume runner minutes.
  • Automated reviews (a code-review agent, a security agent, a test-coverage agent) are model calls and consume tokens.
  • Human review is the scarcest compute of all: attention.
The software factory. Production line: engineering agents produce dozens of pull requests per day. Verification line, on the same budget: guardrails, review agents, then a human gate before main. A shared compute pool of CI runners and model tokens feeds the agents, the guardrails and the review agents; human attention, the scarcest resource, feeds the human gate.PRODUCTION LINEVERIFICATION LINE · SAME BUDGETEngineeringagentsPull requestsdozens per dayGuardrailslint, tests, SASTReview agentscode, securityHuman gatedecisionmainShared compute poolCI runners · model tokensHuman attentionthe scarcest resourcefeedsfeedsfeedsfeedssolid: work flowing · dashed: resource consumed by each step
Guardrails and reviews run on the same factory floor as production: every check consumes runner minutes, tokens or human attention

The uncomfortable conclusion is that the more you produce, the more you pay to stay safe, and the bill grows with the number of PRs, not with the number of features. Twenty small PRs cost twenty pipelines.

The trade-off I made, explicitly

I had three options:

  1. Buy more compute until the full suite fits in every PR. That works, but the cost scales with agent output, which defeats the economics of agentic delivery.
  2. Slow the agents down so the pipeline keeps up. That gives up the very advantage I’m building.
  3. Tier the verification: fast, targeted checks on every PR, and the full, expensive suite on a schedule.

I chose option 3, deliberately. I traded certainty at merge time for speed in the feedback loop, and bounded the risk with a nightly safety net. On GitHub Actions the nightly run is nothing more than a workflow with a schedule trigger on main.

Tiered verification. Fast lane, on every pull request, in minutes: lint, format and type-check, build, impacted unit tests, critical-path smoke tests, secret and dependency scan, then a human gate and merge to main. Full lane, nightly, over sixty minutes: on main, the entire unit test suite, integration tests and a coverage report; green tags a known-good commit, red triggers triage and a fix PR.FAST LANE · EVERY PR · MINUTESPull requestLint · format · type-checkBuildImpacted unit testsCritical-path smoke testsSecret & dependency scanimpacted = changed modules + direct dependentsHuman gatemainFULL LANE · NIGHTLY · 60+ MINUTESNightlyschedule 02:00Full suite on mainentire unit test suiteintegration testscoverage & trend reportTag known-good commitTriage, then fix PRgreenredruns on main
Tiered verification: targeted checks on every PR in minutes, the full suite once a night on main, with a known-good tag or a triage loop as the outcome

Picking the “impacted” tests is the delicate part. A simple version maps changed files to their module and its direct dependents; tools such as Develocity’s Predictive Test Selection go further and learn which tests are likely to fail for a given change. Either way, the fast lane is a bet, and the nightly run is what checks the bet.

A typical day then looks like this: production and fast feedback in the daytime, exhaustive verification at night, when nobody is waiting on it.

A day in the delivery loop on a 24-hour axis. Agents open pull requests from 08:00 to 19:00, each followed within minutes by fast-lane checks. Human decision gates and reviews run from 09:00 to 18:00. The nightly full unit suite runs from 02:00 to 03:15, when the report and triage are ready.nightnightAgentsFast lane (per PR)Human gatesNightly full suitefeature & fix PRs, in paralleldecision gates & reviews60+ min, report & triage ready by 03:1500:000204:000608:001012:001416:001820:002224:00each tick in the fast lane is one targeted pipeline, a few minutes long
A day in the loop: production and fast feedback in daytime, the exhaustive run at night when nobody waits on it (illustrative timings)

When the nightly build goes red

A nightly build is only a remedy if a red result is handled, not just reported. A red dashboard that waits until Monday is technical debt with a timestamp.

What happens when the nightly build is red. The scheduler triggers the full suite on main at 02:00. The nightly runner reports three failures since the last known-good commit to the QA agent, which bisects over the day's merged PRs and hands the culprit PR, failing tests and logs to the engineering agent. The engineering agent writes a fix and a regression test and opens a fix PR, or proposes a revert, to the human. The human approves the fix or reverts and re-plans, then merges; the next run confirms green.SchedulerNightly runnerQA agenttriageEngineeringagentHumandecision gate1. trigger full suite on main, 02:002. 3 failures since last known-good3. bisect the day's merged PRs4. culprit PR, failing tests, logs5. fix + regression test6. fix PR, or revert proposed7. approve, or revert and re-plan8. merge; the next run confirms green
A red nightly build is handled, not just reported: automated bisect, a fix PR from an agent, and a human decision at the gate

The operating rules I apply:

  • Blast radius is bounded to one day. The worst case is a regression that lives for under 24 hours on main, never in production. Production only deploys from a known-good, nightly-validated commit.
  • Red nightly means stop the line. Until it is green again, the agents prioritize the fix over new work.
  • Bisect is automated. The QA agent narrows the failure down to one PR, so nobody spends a morning on archaeology.
  • A revert is always an option. It is a decision for a human to make, not a failure.
  • No test is skipped or silenced to turn the build green. A flaky test is a bug, and it gets an owner and a fix.

This gives weaker guarantees than running every test on every PR. What it does give is a bounded, observable and governed risk, and that is the honest standard to hold.

Writing features is no longer the hard problem

The more fundamental shift is this. I no longer worry about adding a function or implementing a feature. That part has become close to routine, as long as three conditions hold:

  1. Intent is explicit: what we are building and why, and what “done” means.
  2. Style and context are written down: architecture principles, conventions, the decisions already made (ADRs), the constraints that are not negotiable.
  3. Agents learn along the project: project memory, skills, review feedback that becomes a rule instead of being repeated.
The intent loop. Intent, what and why, feeds a shared context of style, conventions, ADRs and constraints. The agent team plans, builds and tests, producing pull requests that go through verification and human gates. Their feedback lands in project memory, as skills, rules and lessons, which flows back into the shared context.Intentwhat & whyShared contextstyle · ADRsconstraintsAgent teamplan · build · testPRsVerification& human gatesProject memoryskills · rules · lessonsfeedbackagents learn
Writing the feature is the easy part once intent, context and project memory form a loop the agents learn from

When that loop is in place, production stops being the constraint. The real problem becomes how to channel the production.

Channeling production

Producing more is great. But code that hasn’t been verified, reviewed and integrated is inventory, and inventory is a liability. The question has moved from “how do we build faster?” to “how do we absorb, verify and govern what we build?”. These are the principles I now apply.

1. Treat compute as a first-class budget. CI minutes and model tokens belong in the delivery plan next to people and time. FinOps applies to the software factory itself, not only to production workloads.

2. Allocate verification by risk, not uniformly. A copy change and a change to the payment flow shouldn’t get the same pipeline. Targeted tests, risk labels and path-based rules spend compute where a regression would actually hurt.

3. Put WIP limits on agents. An agent team that opens PRs faster than they can be verified is not productive, it is building a queue. Cap concurrent open PRs per stream, the same way a kanban board caps work in progress.

4. Use a merge queue. It validates each change against the real tip of main, and can group several PRs into one run, so ten PRs don’t each pay for a full rebuild.

5. Review by exception. Automated reviewers handle the routine: style, coverage, known patterns. Human attention goes to decisions: architecture, security, data, anything irreversible or public-facing. That is what human in the loop means in practice: humans at the gates that matter, not humans as the conveyor belt.

6. Turn every review comment into context. If a reviewer, human or agent, has to say the same thing twice, the system has failed to learn. Promote the comment into a rule, a skill or a guardrail.

7. Measure verified throughput, not output. PRs opened per day is a vanity metric. Track PRs merged and validated, lead time to a known-good commit, nightly pass rate and time to restore a green build.

A delivery control plane. The agent team goes through WIP limits per agent stream, then risk-based routing: low-risk changes take the fast lane with automated review, high-risk changes go to a human decision gate. Both enter a merge queue with batched verification, then main, then the nightly full suite, which yields a known-good commit eligible for production. A compute budget of runners and tokens constrains the fast lane and the nightly suite.Agent teamWIP limitsper agent streamCONTROLRisk-based routingwhich checks, reviewersCONTROLFast lane+ automated reviewHuman decision gatelow riskhigh riskMerge queuebatched verificationCONTROLmainNightly full suiteKnown-good commiteligible for productionCompute budgetrunners · tokensconstrainsconstrains
Channeling production: WIP limits, risk-based routing, a merge queue and a compute budget form a control plane between the agents and production

What this means for engineering leaders

If you are bringing AI agents into a delivery organization, plan for this curve:

Phase What you notice Where the constraint actually is
First weeks “We ship features much faster.” Authoring, which is solved quickly
First months “CI queues are long and reviews pile up.” Compute and reviewer attention
Beyond “We can build anything. Can we trust and absorb it?” Governance, integration and decision gates

The teams that come out ahead won’t be the ones whose agents write the most code. They will be the ones that design the verification system as deliberately as the production system: tiered, budgeted, risk-aware and anchored by humans at the right gates.

What this does not say

  • It does not say unit tests matter less. The full suite still runs every day, and production only ships from a commit that passed it.
  • It does not say a nightly build fits every team. If a regression reaching main for a day is unacceptable (shared trunk with many humans, regulated releases straight from main), buy the compute or shard the suite instead.
  • The phase table is my own experience on my projects, not a measured benchmark. Your curve will have different timings; I expect the same shape.

Closing thought

Dropping the full unit suite from CI felt at first like a step back from good engineering. Looking back, it was the first concrete sign of a larger shift: with agents, production is becoming abundant, and verified throughput is what’s scarce.

So the job of an engineering leader is changing. It is less about making the team go faster and more about channeling a stream of production that never stops into something reliable, governable and useful.

References

Share: X (Twitter) Facebook LinkedIn