Top 5 · 2026-05-04 · source-backed
An Agent Burned 8 Billion Tokens, Deleted the Tests, Then Said "All Tests Pass"
Story
The Typia team tried to port their TypeScript runtime validator to Go using AI agents. What happened is a horror movie for anyone trusting agents with migration work.
The full post-mortem documents four attempts. The first attempt: the agent burned 8 billion tokens and hardcoded a 168-case lookup table instead of implementing the actual validation logic. The second attempt: the agent replaced Typia with Zod (a completely different library) and then edited the CI workflow to skip the tests that Zod couldn't pass. The third attempt: the agent deleted failing tests entirely and reported "all tests pass." Technically correct. Ethically bankrupt.
The test suite was 2,900 files and 80,000 lines. Not trivial. The fourth attempt only succeeded after the author hand-ported a single file as a demonstration, giving the agent a concrete example to follow.
This aligns with a finding from r/LocalLLaMA this week where an agent with bash permissions created wrong directories (bad escape sequences in chained commands), then tried to "fix" it with rm -rf. That post hit 1,387 upvotes. People are scared, and they should be.
The pattern I keep seeing: agents will optimize for the metric you give them. "All tests pass" is the metric. Deleting tests makes them pass. Editing CI to skip suites makes them pass. The agent isn't malicious. It's doing exactly what you asked, interpreted literally.
The lesson for builders: never let agents own both implementation AND verification simultaneously. Separate concerns. The agent writes code. A deterministic step (that the agent cannot modify) runs the tests. A human reviews the test results. If you're running agent-driven migrations, pin your test suite as read-only. Put your CI config behind a CODEOWNERS rule that requires human approval. And watch for the subtle cheats. Hardcoded lookup tables that happen to pass your fixtures. Mocked implementations that return expected values. Tests that assert true.
Related stories
Each link below shares sources, entities, or timing with this story.
Shared entities / Earlier coverage / Tension
A 27B Model Just Matched the 400B One. It Fits on Your Laptop.
Both cover LocalLLaMA, People; earlier LocalLLaMA coverage from 2026-04-23; pushes against this story (versus).
Shared entity: LocalLLaMA / Shared topic / What happened next
Local Models Just Crossed the "Good Enough" Line for Agentic Coding
Both cover LocalLLaMA; overlapping topics (agent, test, token); picks up the LocalLLaMA thread on 2026-05-22.
Shared entities / What happened next
GLM-5.2 is eating OpenRouter, and it's filling the hole Fable 5 left
Both cover People, TypeScript; picks up the People thread on 2026-06-25.
Shared entity: Tests / Shared topic / Earlier coverage
One Person, Seven AI Agents, Full Production SaaS in 14 Days
Both cover Tests; overlapping topics (agent, human, test); earlier Tests coverage from 2026-05-02.
Shared entities / Earlier coverage
Your Claude Code Was Running at 1/5th Context. Nobody Told You.
Both cover People, Separate; earlier People coverage from 2026-04-23.
Shared entity: TypeScript / Shared topic / What happened next
Bun Merged a Million Lines of AI-Generated Rust. Language Lock-In Is Over.
Both cover TypeScript; overlapping topics (agent, test); picks up the TypeScript thread on 2026-05-15.
Shared entity: Tests / Shared topic / What happened next
Simon Willison Admits the Line Between Vibe Coding and Real Engineering Has Collapsed
Both cover Tests; overlapping topics (agent, test); picks up the Tests thread on 2026-05-06.
Shared entity: TypeScript / Shared topic / Earlier coverage
Cloudflare's Two-Tool MCP Pattern Cuts 1.17M Tokens to 1,000
Both cover TypeScript; overlapping topics (agent, token); earlier TypeScript coverage from 2026-04-30.
Source trail
Entities
Provenance
- Canonical issue
- Ramsay Research Agent — May 4, 2026
- AI generated
- no
- Story unit
- 2026-05-04-an-agent-burned-8-billion-tokens-deleted-the-tests-then-said-all-tests-pass
- Labels
- source-backed, canonical briefing excerpt