Overview
Nicholas Carlini from Anthropic's Safeguards team describes how he built a 100,000-line Rust-based C compiler using 16 parallel Claude agent instances working autonomously on a shared codebase. The compiler can build a bootable Linux 6.9 kernel on x86, ARM, and RISC-V, and was produced over nearly 2,000 Claude Code sessions at a cost of $20,000. The article focuses on the design of harnesses for long-running autonomous agent teams, including testing strategies, parallelization techniques, and the practical limits of this approach.
What You'll Learn
How to design harnesses for long-running autonomous LLM agent teams that can work without human oversight
How to structure work so multiple AI agents can make progress in parallel on a shared codebase using git-based synchronization
Why writing high-quality tests is critical for autonomous agent workflows and how to design test harnesses specifically for LLMs
How to use a known-good compiler oracle technique to enable parallel debugging of a single monolithic task like kernel compilation
When agent teams hit their ceiling and what limitations to expect from fully autonomous LLM development
Prerequisites & Requirements
- Understanding of compiler architecture concepts (parsing, code generation, SSA IR, optimization passes)
- Familiarity with git workflows including branching, merging, and conflict resolution
- Experience with Docker containers for isolated development environments
- Understanding of LLM agent scaffolding concepts and Claude Code
- Experience with CI/CD pipelines and automated testing infrastructure(optional)
Key Questions Answered
How can multiple Claude AI agents work in parallel on the same codebase?
How do you keep autonomous AI agents running continuously without human intervention?
How much does it cost to build a C compiler using AI agents?
How do you prevent parallel AI agents from duplicating each other's work?
What are the limitations of AI-generated compilers compared to human-written ones?
How should you design test suites specifically for autonomous AI agent development?
What specialized roles can parallel AI agents take on in a development team?
How did Claude's compiler capabilities evolve across model generations?
Key Statistics & Figures
Technologies & Tools
Some links below are affiliate links. We may earn a commission if you make a purchase.
Key Actionable Insights
1Design your test harness output specifically for LLM consumption, not human consumption. Minimize verbose output that pollutes the context window, log detailed information to files with easily greppable error patterns (e.g., ERROR on the same line as the reason), and pre-compute aggregate statistics so the agent doesn't waste tokens re-computing them.LLMs have context window limitations and time blindness, so the testing infrastructure needs to be optimized for machine processing rather than human readability.
2Use a known-good oracle to decompose monolithic tasks into parallelizable subtasks. When agents get stuck on a single large task (like compiling a kernel), use a reference implementation to randomly assign portions of work, allowing each agent to isolate and fix different bugs independently.Without this technique, all 16 agents hit the same bug, fixed it independently, and overwrote each other's changes, making parallelism useless for monolithic tasks.
3Implement file-based task locking through git synchronization to prevent duplicate work across parallel agents. Each agent claims a task by writing a file to a shared directory, and git's merge semantics naturally resolve conflicts when two agents attempt the same task.This approach is deliberately bare-bones and avoids complex orchestration agents or communication protocols, relying instead on git's existing synchronization guarantees.
4Have autonomous agents maintain extensive README and progress files that are updated frequently, so each new agent session (which starts with no context) can quickly orient itself on the project's current state and determine what to work on next.Each agent is dropped into a fresh container with no prior context, so self-maintained documentation becomes the primary mechanism for knowledge transfer between sessions.
5Build a CI pipeline with strict regression enforcement as the project matures. Near the end of the project, Claude frequently broke existing functionality when implementing new features, so stricter automated testing that prevents commits from breaking existing code became essential.This is especially important for autonomous agents that lack the intuition a human developer has about which changes might cause regressions in seemingly unrelated areas.
6Assign specialized roles to different parallel agents rather than having all agents work on the same primary task. Dedicate specific agents to code deduplication, performance optimization, code quality review, and documentation to maintain overall project health.LLM-written code frequently re-implements existing functionality, making a dedicated deduplication agent particularly valuable in multi-agent workflows.