« All posts

Checkly Let AI Agents Rewrite Its 92M-Message-a-Day Node Service to Go

Checkly used Claude Code to rewrite a 92M-message-a-day Node service into Go, cutting pods 70% with zero incidents via a rigorous test harness.

Checkly rewrote its Results Daemon, a background worker processing roughly 92 million messages a day, from vanilla JavaScript to Go — and had Claude Code (via Fable) write most of the implementation. The outcome was zero incidents, a 70% reduction in running pods, and lighter database load. Go's stronger type system also proved a better fit for agentic coding than JavaScript, adding protection against regressions.

The key enabler was a test harness built before the agent wrote any code. It treats the service as a black box, asserting byte-level parity against 'golden files' captured from the legacy system, and uses real boundary instances — a live PostgreSQL container plus a custom-built SQS emulator — rather than mocks. Test inputs were derived from real production data pulled into ClickHouse (combinations of account, group, and check configurations with result outcomes), with coverage reports fed back to the agent to close gaps. A separate Toxiproxy-based suite validated behavior under infrastructure failures.

Running overnight, the agent produced a deployable ~13,000-line Go service within the token limits of a $200 subscription; an earlier attempt using Opus with the same instructions failed to meet the bar and was discarded. The case demonstrates that agentic rewrites can be trusted for critical, high-throughput production services when backed by a rigorous, implementation-agnostic test harness.

This synthesis was produced from its source by AI; there is no human editor or manual review step. How we work