# carlini-anthropic-building-c-compiler-parallel-claudes-2026-02-05

## Veille

C compiler in Rust built by 16 parallel autonomous Claude agents - Anthropic

## Titre Article

Building a C Compiler with a Team of Parallel Claudes

## Date

2026-02-05

## URL

https://www.anthropic.com/engineering/building-c-compiler

## Keywords

C compiler, Rust, parallel agents, Claude Opus 4.6, AI agent autonomy, Claude Code, agentic coding, Linux 6.9, x86, ARM, RISC-V, 100,000 lines, 20,000 dollars, Docker, agent synchronization, automated testing, GCC, agent specialization, autonomous agent security

## Authors

Nicholas Carlini (chercheur équipe Safeguards, Anthropic)

## Ton

**Profile**: Technical engineering post, narrative-analytical register, very advanced technical level

**Description**: Anthropic engineering blog post combining an experiment narrative with technical lessons. The tone is that of a security researcher sharing, with enthusiasm and honesty, a personal project pushing the model's limits. The writing alternates between precise technical descriptions (bash scripts, Docker architecture, synchronization algorithms) and broader reflections on the implications. The author openly acknowledges the limitations and security risks, bringing a nuanced perspective through a penetration-testing background. The target audience consists of engineers and AI researchers interested in autonomous multi-agent systems.

## Pense-betes

- **Main result**: 100,000-line C compiler in Rust, built by 16 Claude Opus 4.6 agents in parallel, ~2,000 Claude Code sessions, cost ~$20,000
- **The compiler compiles Linux 6.9** on x86, ARM, and RISC-V, as well as QEMU, FFmpeg, SQLite, PostgreSQL, Redis, and Doom
- **Parallel agent architecture**:
- Simple bash loop relaunching Claude in `--dangerously-skip-permissions` mode
- Isolated Docker containers, repos mounted at `/upstream`
- Synchronization via lock files in `current_tasks/` + Git
- No inter-agent communication or explicit orchestration — autonomous task selection
- **Role specialization**: code deduplication, performance optimization, generated-code efficiency, Rust design review, documentation
- **Key lessons for autonomous agents**: 1. **Very high-quality tests**: agents solve exactly what they're given, so test accuracy is critical 2. **Think from Claude's perspective**: each agent enters a blank container → exhaustive READMEs required; minimal test output; `--fast` flag for random sampling (1-10%) 3. **Enable parallelism**: easy when many independent tests are failing, hard for a monolithic task (e.g. Linux kernel compilation). Solution: GCC as a "reference oracle" + partial random compilation 4. **Multiple roles**: specialization becomes possible once parallelism is in place
- **Model progression**: Opus 4 = barely functional compiler, Opus 4.5 = first compiler to pass test suites, Opus 4.6 = compiles Linux
- **Consumption**: 2 billion input tokens, 140 million output tokens, ~$20,000 — a fraction of the cost of human development
- **Honest limitations**: no 16-bit x86 (falls back to GCC), incomplete assembler/linker, not universally compatible, generated code less performant than GCC -O0, Rust code quality decent but not expert-level
- **Security**: the author (pentest background) stresses that passing tests does not guarantee correctness; deploying unverified autonomous software is a real risk
- **Memorable quote**: "Building this compiler has been some of the most fun I've had recently, but I did not expect this to be anywhere near possible so early in 2026."
- **Source code**: available on GitHub (anthropics/claudes-c-compiler)

## RésuméDe400mots

Nicholas Carlini, a researcher on Anthropic's Safeguards team, led an ambitious experiment: having a C compiler in Rust built entirely by Claude Opus 4.6 agents working in parallel, with no direct human intervention on the code.

**Multi-agent architecture**: 16 Claude instances worked simultaneously in isolated Docker containers, sharing an upstream Git repository. Each agent autonomously selects its next task via a file-locking system. Synchronization relies on Git: an agent claims a task, works on it, pushes its changes, then moves to the next one. No explicit communication between agents is required.

**Impressive results**: in roughly 2,000 Claude Code sessions and $20,000 in API cost (2 billion input tokens, 140 million output tokens), the resulting 100,000-line compiler successfully compiles Linux 6.9 on three architectures (x86, ARM, RISC-V), as well as major projects such as QEMU, FFmpeg, SQLite, PostgreSQL, Redis, and even Doom, with a 99% pass rate on compiler test suites including the GCC torture suite.

**Design lessons**: the author shares four key takeaways. First, test quality is critical because agents solve exactly what is specified. Second, one must think from Claude's perspective: each agent enters a blank environment with no context, requiring exhaustive documentation and minimal output to preserve the context window. Third, enabling parallelism is essential: easy when many independent tests are failing, but compiling the Linux kernel proved problematic because all agents were fixing the same bugs. The solution: using GCC as a "reference oracle" to randomly distribute the files to compile. Fourth, specializing agents by role (deduplication, optimization, design review, documentation) maximizes efficiency.

**Model progression**: the article also serves as a capability benchmark. Opus 4 barely produced a functional compiler, Opus 4.5 enabled the first compiler to pass test suites, and Opus 4.6 pushes the boundaries by compiling real large-scale projects.

**Security concerns**: the author, drawing on a penetration-testing background, notes that passing tests does not guarantee software correctness. Autonomous deployment of code unverified by humans represents a real risk requiring new security strategies. The source code is available on GitHub (anthropics/claudes-c-compiler).

## GrapheDeConnaissance

- Nicholas Carlini —utilise→ agents parallèles (METHODOLOGIE, 0.99)
- Nicholas Carlini —travaille_chez→ Anthropic (ORGANISATION, 0.99)
- Nicholas Carlini —a_créé→ compilateur C en Rust (TECHNOLOGIE, 0.99)
- Claude Opus 4.6 —a_créé→ compilateur C en Rust (TECHNOLOGIE, 0.99)
- compilateur C en Rust —s_applique_à→ Linux 6.9 (TECHNOLOGIE, 0.98)
- compilateur C en Rust —mesure→ 99% de réussite sur suites de tests (MESURE, 0.97)
- agents parallèles —utilise→ Docker (TECHNOLOGIE, 0.98)
- agents parallèles —utilise→ synchronisation par fichiers verrou (METHODOLOGIE, 0.97)
- agents parallèles —utilise→ GCC (TECHNOLOGIE, 0.95)
- spécialisation par rôle —améliore→ agents parallèles (METHODOLOGIE, 0.9)
- sécurité agents autonomes —est_basé_sur→ vérification humaine (CONCEPT, 0.92)
- Nicholas Carlini —affirme_que→ la qualité des tests est critique pour les agents autonomes (AFFIRMATION, 0.97)
- Claude Opus 4.6 —surpasse→ Claude Opus 4.5 (TECHNOLOGIE, 0.96)

---
Canonical: https://www.thekb.eu/en/fiches/carlini-anthropic-building-c-compiler-parallel-claudes-2026-02-05/
