---
title: "Building a C compiler with parallel Claudes"
description: "Sixteen parallel Claude Opus 4.6 agents, run in an infinite loop inside Docker containers and coordinating through git-based task lock files, wrote a 100,000-line Rust C compiler from scratch over about 2,000 sessions and $20,000 in API costs."
url: "https://swe.quest/articles/building-a-c-compiler-with-parallel-claudes-df4a93aecd3953ce"
canonical: "https://www.anthropic.com/research/building-c-compiler"
source: "Anthropic Engineering"
published: "2026-02-05"
difficulty: "medium"
kind: "Case study"
reading_minutes: 11
tags: ["ai-agents","ai-coding","compilers","testing","rust"]
---

# Building a C compiler with parallel Claudes

A post on [Anthropic Engineering](https://swe.quest/sources/anthropic.md), published 2026-02-05, 11 min read, Case study. Original: [https://www.anthropic.com/research/building-c-compiler](https://www.anthropic.com/research/building-c-compiler)

## Summary

Sixteen parallel Claude Opus 4.6 agents, run in an infinite loop inside Docker containers and coordinating through git-based task lock files, wrote a 100,000-line Rust C compiler from scratch over about 2,000 sessions and $20,000 in API costs. The compiler builds a bootable Linux 6.9 on x86, ARM and RISC-V, along with QEMU, FFmpeg, SQLite, Postgres and Redis. The main lessons are about harness design: near-perfect tests and CI to prevent regressions, terse grep-friendly logs to avoid polluting context, deterministic per-agent test sampling to work around time blindness, and GCC as a known-good oracle so agents could split up kernel bugs instead of colliding on one. Limitations remain, including no 16-bit real-mode codegen, a buggy assembler and linker, and output code slower than GCC -O0.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [AI for coding](https://swe.quest/tags/ai-coding.md) (AI & ML)
- [Compilers](https://swe.quest/tags/compilers.md) (Compilers & runtimes)
- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)
- [Rust](https://swe.quest/tags/rust.md) (Languages)

## Prerequisites

- LLM coding agents ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- git workflows
- compiler basics

## Keywords

Claude Code, Claude Opus 4.6, Linux kernel, GCC, agent teams, Docker

## Related posts

- [Grit: rewriting Git in Rust with agents](https://swe.quest/articles/grit-rewriting-git-in-rust-with-agents-d98b14c481f36775.md): GitButler · 2026-06-09 · Medium · 15 min read · AI for coding, AI agents, Rust, Version control, Testing
  Grit is a from-scratch, library-based, memory-safe Rust reimplementation of Git, built largely by swarms of coding agents, that passes over 99% of Git's 42,000-test suite (with email, i18n, p4/svn importers and some midx/bitmap tests deliberately skipped).
- [Effective harnesses for long-running agents](https://swe.quest/articles/effective-harnesses-for-long-running-agents-987ba1b5b74b4050.md): Anthropic Engineering · 2025-11-26 · Medium · 9 min read · AI agents, AI for coding, LLMs, Testing
  Long-running coding agents lose all memory between context windows, and compaction alone doesn't stop them from trying to one-shot an app, leaving half-finished work, or declaring the project done early.
- [How we're shipping faster with Claude Code and Git Worktrees](https://swe.quest/articles/how-we-re-shipping-faster-with-claude-code-and-git-worktrees-4004ae933e0806d1.md): incident.io · 2025-06-27 · Medium · 12 min read · AI for coding, Version control, Developer productivity, AI agents
  incident.io engineers run four to seven Claude Code agents in parallel, each isolated in its own Git worktree so concurrent sessions don't clobber a shared working directory.
- [A Virtual Agent team at Docker: How the Coding Agent Sandboxes team uses a fleet of agents to ship faster](https://swe.quest/articles/a-virtual-agent-team-at-docker-how-the-coding-agent-sandboxes-team-uses-a-fleet-c083dfabe4b49d2c.md): Docker · 2026-05-01 · Medium · 12 min read · AI agents, AI for coding, CI/CD, Testing, Developer productivity
  Docker's Coding Agent Sandboxes (sbx) team runs a "Fleet" of seven autonomous Claude Code skill-based agent roles: build engineer, project manager, product owner, CLI tester, performance tester, upgrade tester and software engineer.
- [Agent-driven development in Copilot Applied Science](https://swe.quest/articles/agent-driven-development-in-copilot-applied-science-57df9b7433878456.md): GitHub Engineering · 2026-03-31 · Medium · 9 min read · AI for coding, AI agents, Developer productivity, Evaluation, Testing
  A Copilot Applied Science researcher built eval-agents, a set of Copilot SDK-based agents that automate analysis of coding-agent trajectories from benchmarks like TerminalBench2 and SWEBench-Pro, and developed it primarily through coding agents.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
