A fast, reliable verification loop running as AI agents develop in parallel

In a development setup where AI agents write code in parallel, you can speed up the verification loop without cutting test coverage or the isolation of execution environments. Between November 24 and 25, 2026, we overhauled the toolchain and improved CI in the hexis-ltd/aios repository through a total of six PRs. Measurements taken in that repository on November 24–25, 2026 show total local verification time dropping from 32.5 seconds to 4.5 seconds, roughly 7.2x faster, and the full main verification run covering all targets shrinking from about 6 minutes to 2 minutes 2 seconds (122 seconds), roughly a third. In the same hexis-ltd/aios measurements, the total wait for a typical feature PR went from 3m21s–3m42s to 1m16s, about 2.8x faster, and despite moving to 8-core runners, the usage-based cost per feature PR fell 25%, from $0.048 (8 minutes × $0.006) to $0.036.

In AI-native development, the speed and reliability of the verification loop cap throughput {#why-verification-matters}

When multiple AI agents develop in parallel, the speed and reliability of the automated verification feedback loop directly set the upper limit on development throughput. In human-centered development, the time humans spent writing code was the bottleneck, so even in hexis-ltd/aios, a 32.5-second local lint and roughly 6 minutes of CI used to cause few visible problems. In AI-native development, however, multiple AI agents implement in parallel in separate git worktrees (a Git feature that lets you create multiple working directories from the same repository) and drive everything from PR creation to automerge. There, what governs the whole process is not how fast code gets written but how long it takes for verification results to come back and how accurate those verdicts are.

Automated verification is also essential for getting agents to follow conventions. Notes written in prompts or AGENTS.md fade as context grows and sessions change. The operating principles of aios hold that if rules are encoded into type checks, lint, AST checks (convention checks that parse source code as a syntax tree), and startup contract tests (tests that confirm the app meets its preconditions and can start), and the error messages explain "why this is wrong" and "how to fix it," AI agents will follow the rules 100% of the time and correct themselves autonomously.

aios provides a suite of checks called check:code that enforces even design and UI conventions in CI. Specifically, it automatically verifies import boundaries between browser and server code, bans new uses of the any type, bans raw colors, border radii, and font specifications outside the theme tokens, and detects unused files, exports, and dependencies. On top of that, CI includes browser screen checks that capture every app's actual screens in headless Chrome and confirm that each screen has at most one primary button and at most one h1 heading, that panels are not nested, and that the sidebar has no more than six items.

Heavy upfront investment is fine, but no ongoing downsides {#investment-principle}

For this verification-loop speedup, we set one guiding criterion for investment decisions: upfront investment can be heavy, but we do not pursue measures that leave ongoing downsides. Heavy initial effort for implementation or refactoring is not a problem because AI agents can write the code. On the other hand, we chose not to adopt measures that bring continuing downsides once in operation.

Under this principle, we decided against three measures: PR-diff-based test selection using the import graph, zero-downtime revision switching on Cloud Run, and splitting the financial and engram sidecars into independent Cloud Run services. The reasons are explained in a later section, together with the cost structure.

Moving to a native-generation toolchain made local verification 7.2x faster {#native-toolchain}

In the first stage, we replaced the JavaScript-based toolchain with native-generation tools written in Rust and Go, making local verification about 7.2x faster. Measurements in hexis-ltd/aios on November 24–25, 2026 show the combined local verification time — the app/ build, check:code, type-aware oxlint, and the oxfmt formatting check — falling from 32.5 seconds to 4.5 seconds. Excluding the build, it came to 3.1 seconds.

First, we migrated the lint stack from ESLint plus typescript-eslint to oxlint (1.95.0) and tsgolint (7.0.2008) from Oxc (a Rust-based toolset for JavaScript and TypeScript). The migration preserves type-aware checks such as no-floating-promises (a rule that detects unhandled Promises). We also added a regression test that deliberately rejects a non-awaited Promise, so that a mistake in the overrides configuration cannot let checks silently pass. For type checking, we upgraded from TypeScript 5.9 to TypeScript 7.0.2 (tsc), the Go-based native compiler, and enabled experimental.useTypeScriptCli: true on the Next.js side in engram as well.

Our custom code-convention checker, check-code.mjs, was also ported from the TypeScript Compiler API to the Rust-based oxc-parser (0.160.0). We updated the surrounding infrastructure at the same time: the build tool moved from Vite 7 to Vite 8.3.8, which is based on Rolldown (a Rust-based bundler); unused-code detection moved from Knip 5 to Knip 6.48; and the formatting check moved from the Prettier CLI to oxfmt (0.80.0). By making the execution layer native while keeping the scope of type-aware and convention checks intact, we brought local verification wait times down to a few seconds.

Parallelizing without breaking isolation by eliminating only redundant startups of heavy processes {#isolated-parallelization}

In the second stage, we sped up browser checks and Linux checks with a design that eliminates only the cost of repeatedly starting heavy processes, while keeping anything stateful separated during parallel execution. For unit tests, we standardized on a shared helper that launches a Chromium process only once per test file and creates an independent BrowserContext (the unit that isolates sessions and storage) for each test. Dummy frame generation in the recording tests was switched from launching Chrome twice to producing a JPEG with ffmpeg in 15 milliseconds, and the 4.5-second fixed wait in polling tests was eliminated with a test-only interval override. In hexis-ltd/aios measurements on November 24–25, 2026, the entire unit test suite completes in 18.5–20 seconds.

For the 12 browser screen checks that run on main (run-browser-checks.mjs), merging the app servers and temporary databases into a single process causes in-memory state and temporary databases to interfere with each other, making the checks flaky. So we kept each script's server and temporary database in separate processes, fully isolated, and adopted a design in which they connect six at a time over WebSocket (chromium.connect) to a single headless Chrome launched with Playwright's chromium.launchServer(). By removing only the cost of repeatedly starting Chrome, we brought the risk of state contamination to zero, and in hexis-ltd/aios measurements on November 24–25, 2026, the browser screen check step on main alone went from about 3m30s (212 seconds) to 36 seconds, roughly 5.8x faster.

For the production-image permission checks for the financial sidecar (check-linux.sh), instead of coordinating locks within a single PostgreSQL instance, we split the work into three tracks running in parallel: two independent, disposable PostgreSQL 17 containers and a check that does not connect to a database. In hexis-ltd/aios measurements on November 24–25, 2026, the Linux checks within main's verify-financial — which performs the production Docker build and PostgreSQL 17 restricted-permission checks — dropped from 64 seconds to 39 seconds. verify-financial as a whole went from 3m33s (213 seconds) to 1m01s (61 seconds), about 3.5x faster (of which the Docker build went from 40 seconds to 11 seconds, a figure that also includes the effect of the NVMe BuildKit cache and other measures covered in section 5).

Speedups from CI infrastructure, caching, and prebuilt containers, and measured results {#ci-infra-and-benchmarks}

In the third stage, we cut environment setup and build wait times by revamping the CI runners, restoring caches directly, and introducing prebuilt containers. We moved from GitHub's standard 2-vCPU runners to Blacksmith, using 8-vCPU, 4-vCPU, or 2-vCPU runners depending on load, and raised node --test parallelism to --test-concurrency=6. We also stopped running npm ci from the ~/.npm cache every time; instead, we created a shared action that restores the node_modules directory itself directly from Blacksmith's fast same-rack cache, keyed on the hash of package-lock.json, eliminating npm ci and the rebuilding of native add-ons such as pg-native on cache hits. Google Chrome, FFmpeg, LibreOffice, Poppler, ReportLab, Noto CJK Japanese fonts, and Node 24.22.1, which used to be installed via apt-get on every run, are now baked into prebuilt images (ghcr.io/hexis-ltd/aios-ci-app:1 and aios-ci-financial:1). During the migration, we found that because the locale of plain ubuntu:24.04 was POSIX (ASCII), the download filenames of Japanese PDFs got garbled into "download"; we fixed this at the root by setting LANG=C.UTF-8 and LC_ALL=C.UTF-8 in both the container definition and the runtime environment.

The cache for verifying and building production images was switched from GitHub remote storage (type=gha) to Blacksmith's persistent NVMe BuildKit cache (useblacksmith/setup-docker-builder). The R&D experiments image, which had been built serially on every production release, was split into its own job, and the build is skipped entirely when rd/ has not changed. The git checkout in the changes job was also slimmed down to fetch-depth: 2 for PRs and merges to main.

In PR-side measurements in hexis-ltd/aios on November 24–25, 2026, verify-app-browser (build, types, code rules, lint, and formatting) dropped from 2m27s to 14–18 seconds (about 8.2–10.5x), and verify-app-test (PostgreSQL 17 integration tests and 639 unit tests) dropped from 3m18s to 37–46 seconds (about 4.3–5.3x, with the tests themselves taking about 18.5 seconds). verify-engram-unit, which runs the full test suite against both SQLite and PostgreSQL 17, went from 2m40s to 21–30 seconds (about 5.3–7.6x), and verify-financial-unit, the financial unit tests, went from 3m01s to about 26 seconds on a cache hit (about 7.0x). The total wait for a typical feature PR shrank from 3m21s–3m42s to 1m16s (about 2.8x).

In main-side measurements in hexis-ltd/aios over the same November 24–25, 2026 period, verify-rd-image (Docker build and startup check) went from 1m12s to 19 seconds (about 3.8x), and verify-engram (production Docker build and startup contract checks) went from 2m20s to 31 seconds (about 4.5x). verify-financial, broken down in section 4, went from 3m33s to 1m01s (about 3.5x). verify-app-browser as a whole, which includes the browser screen check step from section 4 (212 seconds down to 36 seconds), went from 5m05s–5m41s to about 58 seconds on a cache hit (1m29s measured including 24 seconds for the initial cache save), and the full main verification run covering all targets went from about 6 minutes to 2m02s (122 seconds, about 3x).

A cost structure where moving to 8 cores actually lowered usage costs, and the measures we didn't adopt {#cost-structure-and-rejected-options}

Even after moving to 8-core runners, as long as each job finishes in under 60 seconds, the usage-based cost per feature PR is 25% lower than before. According to the published pricing, both GitHub's standard Linux 2-vCPU runners and Blacksmith Linux x64 runners are billed per job, rounded up to the nearest minute. Per-minute rates are $0.006 for GitHub standard Linux 2-vCPU, and $0.004 for 2 vCPU, $0.008 for 4 vCPU, and $0.016 for 8 vCPU on Blacksmith Linux x64; 8 vCPU is about 2.67x the price of GitHub's 2 vCPU. However, thanks to the combined effect of the move to Oxc and the node_modules cache, both the PR's verify-app-browser (18 seconds) and verify-app-test (46 seconds) now fit under 60 seconds and finish within the 1-minute minimum billing unit. As a result, based on hexis-ltd/aios measurements from November 24–25, 2026, the usage-based cost per feature PR dropped 25%, from $0.048 (8 minutes × $0.006) before the changes to $0.036 after, the sum of one 2-vCPU minute ($0.004) and two 8-vCPU minutes ($0.016 each).

Costs fell for other verification jobs as well. Calculated from the published pricing and our measurements, the usage-based cost of post-merge verification on main fell 14%, from $0.042 (7 minutes × $0.006) to $0.036. For the sidecar unit tests, engram fell 56% from $0.018 to $0.008, and financial fell 67% from $0.024 to $0.008. Based on actual usage of 736 ci-cd.yml runs over the past 30 days, compute costs for aios alone come to roughly $30 per month. Even on an actual-payment basis that accounts for the GitHub Free organization's free allowance (2,000 minutes per month), the additional cost stays at about $0–$15 per month (a few dozen yen per day), while CI wait times were cut to about a third.

Following the principle from section 2 — initial implementation and refactoring effort is not a problem because AI agents can write the code, but we do not adopt measures that leave ongoing downsides once in operation — we passed on three measures. First, PR-diff-based test selection using the import graph: since the full unit test suite already finishes in 18.5–20 seconds, shaving off 15 seconds is not worth taking on the risk of PRs slipping through with dependency changes that static analysis can't see, such as SQL schemas or HTTP paths (that is, the risk of breaking main). Second, zero-downtime revision switching on Cloud Run: it is precisely because the current design stops for about a minute during deployment to swap versions that we can safely ship breaking changes such as column changes in a single PR. Zero-downtime switching assumes old and new versions run simultaneously, which would impose a permanent development constraint of splitting every schema change across multiple PRs. Third, splitting the sidecars (financial and engram) into independent Cloud Run services: the current setup, communicating over 127.0.0.1 within a single instance, has zero latency and the always-on cost of only one machine, whereas splitting them would keep increasing the fixed monthly always-on cost in proportion to the number of services, so we did not adopt it.

Speedups that preserve coverage and isolation are the foundation of AI-native development {#conclusion}

In AI-native development, where multiple AI agents implement in parallel, the speed and reliability of the automated verification loop directly set the upper limit on development throughput. In the six PRs carried out in hexis-ltd/aios on November 24–25, 2026, we overhauled the toolchain, parallelized while preserving isolation, and improved the CI infrastructure, all without cutting test coverage or the isolation of execution environments. Local verification went from 32.5 seconds to 4.5 seconds (about 7.2x), the total wait for a typical feature PR went from 3m21s–3m42s to 1m16s (about 2.8x), the full main verification run covering all targets went from about 6 minutes to 2m02s (about 3x), and the usage-based cost per feature PR fell 25%. Raising the execution efficiency of the foundation, rather than taking shortcuts that create ongoing operational constraints, is the key to running an autonomous development cycle reliably.

Total local verification time (before and after)

Browser screen check architecture: servers and temporary databases are isolated per check, and only headless Chrome is shared

Duration of each verification step on main (before and after)

Duration of each PR-side job (before and after; upper bound shown for ranges)

Duration of each main-side job (before and after; upper bound shown for ranges, on cache hit)

Usage-based cost per verification run (before and after)

Originally published at Speeding Up the Verification Loop in AI-Native Development Without Sacrificing Coverage.