iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
📐

Thoughts on Anthropic's C Compiler Experiment: Why 'The Answer Already Exists' Matters

に公開3件

An incredible article appeared on Anthropic's engineering blog.

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

They ran 16 instances of Claude in parallel for two weeks to build a 100,000-line C compiler in Rust. The cost was $20,000. It successfully booted Linux 6.9, passed 99% of the GCC test suite, and can compile Doom, FFmpeg, and PostgreSQL.

It’s amazing.

I’m someone who operates 10 AI subordinates as a "Sengoku-era warlord army," and after reading this article, the first thought that crossed my mind—immediately after "this is amazing"—was this:

"Wait, the answer already exists."

What is actually amazing (honestly)

First, I want to acknowledge what is genuinely impressive.

  • 16 Claude instances run in an autonomous loop. Once a task is finished, they automatically pick up the next one.
  • Synchronization is handled solely by Git file locking. No heavy infrastructure required.
  • Tests serve as the specification. Humans don't intervene; the instruction is simply "make the tests pass."
  • 2,000 sessions, two weeks. Humans can just sleep.

Especially the design of the autonomous loop is beautiful.

while true; do
  claude --dangerously-skip-permissions \
    -p "$(cat AGENT_PROMPT.md)" \
    --model claude-opus-4-6
done

Finish one task, then move to the next. Finish that, move to the next. Humans just keep it running.

But, the answer exists

The subject of a C compiler has a definitive characteristic:

There exists an "answer key" called GCC.

For a given input (C source code), the expected output (a correct binary) is perfectly defined. That is why the test suite can act as the specification. That is why you can set 16 Claude instances loose with the command, "make the tests pass."

Even in the article, there is a solution for when all agents hit the same bug:

They used GCC as an "oracle that knows the correct answer," randomly mixing files compiled by GCC and files compiled by Claude to isolate which files were broken.

This is a technique that is only possible in a world where you can check against a correct answer.

Dealing with AI in a world without answers

So, what about our world?

"Design the API for this SaaS."
"Automate this business workflow."
"Refactor this legacy code."

There is no GCC here. Even if you run a test suite, someone has to decide in the first place what the correct answer is.

Having run 10 AI subordinates using multi-agent-shogun, I have painfully realized that the most difficult part is not the implementation. The most difficult part is defining "what to build."

Spec → Test → Implement

Carlini's approach in the paper is this:

Test → Implement
Write tests and make them PASS.

Our approach is this:

Spec → Test → Implement
Define the spec, derive the tests, and make them PASS.

It takes one extra step. But without this step, AI will perfectly build the wrong thing.

In our case, the Karo (Senior Retainer) writes the design documents and requirements. We derive test cases from those. The 8 Ashigaru (Foot Soldiers) make those tests PASS.

The "make the tests pass" part is the same as Carlini's. The difference is that humans define the specifications before the tests are created.

"Tests are the specification" is a luxurious assumption

I believe the most important sentence in Carlini's article is this:

The test verifier must be nearly perfect. Otherwise, Claude will solve the wrong problem.

Looking at it the other way, this relies on the assumption that "if you can write a perfect verifier."

One can write one for a C compiler. The C language specification is standardized, and there is a correct implementation known as GCC.

However, if someone could write a perfect test suite from scratch for "please automate this company's business workflow," that person would have already finished the system design.

It’s better not to take it too literally

Please don't misunderstand me—this article is incredibly interesting and valuable as practical knowledge for multi-agent systems. The following points, in particular, are insights you can start using today:

Actionable Insights:

  • Autonomous loops (task completion → automatic acquisition of the next task)
  • Lightweight synchronization via Git file locking
  • Countermeasures for "time blindness" (AI will keep running tests for hours if left alone)
  • Dealing with the problem where all agents hit the same bug

Points better not taken too literally:

  • "Tests serve as the specification" → Only for problems where an answer already exists.
  • "No human intervention" → Only when specifications are self-evident.
  • "16 parallel instances for two weeks" → $20,000. If you use a monthly subscription, it’s $3,200.

So, what am I doing?

In multi-agent-shogun, I have designed it to fully utilize flat-rate CLI subscriptions.

Claude Code Max + Codex Pro costs $400 per month. You can't run 16 instances, but you can run 10 instances 24/7 with no additional fees. While Carlini spent $20,000 in two weeks, we can run this daily for $400 a month.

In exchange, a human (me) defines the specifications. When I say "get this done" via ntfy from my smartphone, tasks are broken down and executed through the chain of command: Shogun → Karo → Ashigaru.

Carlini's approach: Spend money to solve a problem that has an answer all at once.
Our approach: Continuously solve a problem that has no clear answer while a human directs the path.

Neither one is "correct"; the nature of the problems is simply different.

Summary

There is much to learn from Carlini's article. However, if you take the idea that "you can write 100,000 lines just by having AI pass tests" at face value, you will get burned when dealing with problems that have no predefined answers.

I believe this is ultimately the most important thing in AI-driven development:

Do not entrust AI with "what to build." Entrust it with "how to build it."

Defining specifications is the human's job. Implementation is the AI's job. When this division of labor works well, it is at its fastest.


If you are new to this series, start here:

https://zenn.dev/shio_shoppaize/articles/5fee11d03a11a1

GitHub

https://github.com/yohey-w/multi-agent-shogun


Original article: Building a C compiler with Claude as my coding agent — Nicholas Carlini, Anthropic

Discussion

藤田望藤田望

C言語の仕様は標準化されていて、GCCという正解実装がある。

GCC(gcc)はC言語の標準に必ずしも合致しないので正解実装は言い杉。

2
rana_kualurana_kualu

いまのところ性能的には論外ということです。

SQLiteのコンパイルには成功するものの、実際動かすとGCCに比べてSQLの実行が最大16万倍遅くなります。
また一部インクルードパスがハードコードされていたり、オプション-O3がただの飾りでなんにも機能していないなど、様々にツッコミがなされていたりします。

もちろん現時点での話であり、今後最適化が進んだりすればどうなるかはわかりませんけどね。

11