Anthropic used 16 Claude AI agents to write 100,000 lines of Rust code and built a C compiler independently.

Anthropic used 16 Claude AI agents to write 100,000 lines of Rust code and built a C compiler independently.

9 months ago
duguying
76 views
Source: oschina

Anthropic announced that their team is experimenting with a new language model supervision method called "agent teams." This method allows multiple Claude instances to process a shared codebase in parallel, without human intervention, significantly expanding the capabilities of LLM agents.

Related tags

#AI#rust

Anthropic published a report detailing a new language model supervision method called “agent teams.” This method allows multiple Claude instances to process a shared code library in parallel, without human intervention, significantly expanding the capabilities of LLM agents.

To test the system’s capabilities, researcher Nicholas Carlini used 16 Claude Opus 4.6 agents to collaboratively write approximately 100,000 lines of Rust code in just two weeks, without significant human intervention. This involved nearly 2,000 Claude Code sessions and a $20,000 API cost, and resulted in the successful creation of a fully functional C language compiler that can build Linux 6.9 on x86, ARM, and RISC-V architectures.

According to the report, to achieve continuous autonomous progress, the researchers built a program that allowed Claude to enter a simple loop. After completing one task, it would immediately begin the next. The researchers also provided Claude with specific instructions, asking it to break down the problem into smaller parts, track the relevant sections, determine the next steps, and continue until the task was perfectly completed.

#!/bin/bash

while true; do
    COMMIT=$(git rev-parse --short=6 HEAD)
    LOGFILE="agent_logs/agent_${COMMIT}.log"

    claude --dangerously-skip-permissions \
           -p "$(cat AGENT_PROMPT.md)" \
           --model claude-opus-X-Y &> "$LOGFILE"
done

In addition, the compiler can also compile QEMU, FFmpeg, SQLite, PostgreSQL, and Redis, and even compile and run the Doom game. In a benchmark against the GCC stress test suite, the compiler achieved a 99% success rate.

However, the researchers also acknowledged the limitations of the compiler. These include:

  • It lacks a 16-bit x86 compiler required for booting Linux in real mode. To address this, it calls GCC (x86_32 and x86_64 compilers are its own components).
  • It does not have its own assembler and linker; these were the last parts to be automated, and currently have some defects. The demonstration video was generated using the GCC assembler and linker.
  • The compiler can successfully compile many projects, but not all. It cannot yet fully replace a traditional compiler.
  • The generated code is not very efficient. Even with all optimizations enabled, its efficiency is lower than that of GCC-generated code with all optimizations disabled.
  • The Rust code quality is acceptable, but far inferior to that of code written by experienced Rust programmers.

“The final compiler almost reached the limits of the Opus functionality. I tried my best to fix the above limitations, but I was not entirely successful. New features and bug fixes often break existing functionality.”

Anthropic has now made the project open source. The researchers also plan to have Claude submit new changes.

For more details, see the official blog.

More News

Want to see more quality content?

Browse all news