5. Run-length code is driving Silicon Valley crazy! An Australian shepherd unlocks the AI programming singularity.

This article is machine translated
Show original

Recently , the story of an Australian sheep farmer who broke through the ceiling of AI programming with 5 lines of code has gone viral.

In late 2025, during a break from shoveling sheep manure, Geoffrey Huntley wrote the following Bash script containing only 5 lines of code.

while :; do cat PROMPT.md | claude-code ; done

He probably never imagined that in just one month, those few lines of code would spark a technological frenzy and directly revolutionize Silicon Valley today!

It can be said that the previously viral Claude Code and the Claude Cowork that have become incredibly popular in recent days are both closely related to this five-line code.

One engineer even predicted that 2026 would be the year that Silicon Valley would be encapsulating Ralph Wiggum!

The mystery of five-stroke code

What exactly does this five-line code mean?

In layman's terms, it means: "Please complete this task. If the test fails, don't even think about leaving. You can look at the error messages yourself, write your own code, and retry as many times as you want. As long as it doesn't throw an error, fix it to death. You're not allowed to leave work!"

The AI ​​actually believed it.

This endless, abusive command loop actually allowed the AI ​​to write code, without any human intervention.

Therefore, the shepherd boy named this loop Ralph Wiggum, after the perpetually tireless and incredibly optimistic little boy from The Simpsons.

Unlike the traditional approach of "aiming to get it right the first time," the core idea of ​​Ralph Loop is to assume that you will get it wrong the first time.

However, if the code is written incorrectly, the compiler will report an error, and the test will fail. This error message is the most valuable asset, as it precisely tells the AI ​​where the error occurred.

Therefore, AI can achieve profound understanding.

Rlpha Wiggum has now become one of the most influential names in the field of AI, having evolved from a character name in an animated film.

It could even be said that Ralph-Wiggum has brought today's large AI models very close to AGI.

The creator of Claude Code praised: "I don't need to write code anymore."

Why is the Ralph-Wiggum loop considered foundational to Claude Code and Cowork?

The story begins at the end of 2025.

At the time, after noticing the magical effect of these five lines of code, Boris Cherny, the Claude Code lead at Anthropic, officially incorporated Geoffrey Huntley's five-line script and launched the official Ralph-Wiggum addon.

From then on, Claude Code was divinely aided.

In Claude Code, you only need the following one-line command:

/ralph-loop “Build a REST API for todos. Requirements: CRUD operations, input validation, tests. Output <promise>COMPLETE</promise> when done.” –completion-promise “COMPLETE” –max-iterations 50

Claude can achieve this:

  • Continuous iteration – trying repeatedly, even when encountering failures.
  • Self-reference learning – based on test results and previous code improvements
  • Until completion – continuously loop until all requirements are met.
  • Output completion promise – Output the specified completion flag when the task is completed.

Boris Cherny's presentation at the end of 2025 caused a major upheaval in the developer community.

He personally admitted that 100% of his contributions to the Claude Code project over the past thirty days were made by Claude Code itself!

Boris recalled that in the past thirty days, he submitted 259 PRs—497 commits in total, adding 40,000 runcodes and deleting 38,000 runcodes. Each runcode was written using Claude Code + Opus 4.5.

At that time, Claude could run for minutes, hours, or even days. It's fair to say that software engineering was undergoing a dramatic transformation, and we had stepped into a new era of coding.

Why can Claude continue running for several days? Boris explains that when it stops, a stop hook can be used to "poke" it and make it continue running.

The unsung hero behind this hook is Ralph-Wiggum!

See this link for details: https://github.com/anthropics/claude-plugins-official/tree/main/plugins/ralph-wiggum

The news was so explosive that Boris's inbox was flooded with messages from developers. So, two days later, Boris shared his exclusive recipe.

In Part 12, Boris mentions that for tasks that take a particularly long time to execute, he usually uses one of the following methods, one of which is to use the ralph-wiggum plugin.

(a) After the task is completed, prompt Claude to use a background agent to verify his work;

(b) Use the agent's Stop hook to perform the verification in a more deterministic and controllable way;

(c) Alternatively, use the ralph-wiggum plugin.

In other words, in just one month since its inception, these 5 lines of code have given birth to today's Claude Cowork Big Bang!

Closest to AGI? Ralph-Wiggum shakes the entire Silicon Valley.

At the same time, Ralph-Wiggum's continuously iterative and cyclical design has enabled other developers to achieve remarkable results.

At the Y Combinator hackathon, someone used it to generate six complete code repositories overnight; someone else completed a $50,000 contract with an API cost of $297.

Within three months, someone even used this method to develop a programming language called cursed!

Videos introducing the Ralpha loop have become ubiquitous on YouTube.

Developer educator Matt Pocock recently explained in detail why Ralph is "so powerful".

The ultimate dream of a programming intelligence is that when you wake up in the morning, the code is already written.

Your AI agent worked quietly all night, clearing your backlog, and the code it wrote can be run directly.

In his view, the Ralph plugin is very close to this dream: "This is the most powerful AI programming tool I have ever used, enabling long-running intelligent agents to actually deliver usable code."

Dennison Bertram, CEO and founder of Tally, a blockchain token creation platform, posted a message saying:

No kidding, this might be the closest thing to AGI I've ever seen:

This hint suggests that Claude is definitely a beast.

Arvid Kahl, founder and CEO of Podscan, an automated podcast business intelligence extraction and brand detection tool, calls the new approach a future-oriented approach with outstanding results:

As Chicago entrepreneur Hunter Hammonds put it: A million-dollar opportunity is right in front of you, but you're not ready.

AI engineer and serial entrepreneur Ian Nutall said, "2026 is the year of Ralph Wiggum."

Failure itself is valuable data.

Ultimately, Ralph technology is very simple in essence: a Bash loop.

However, the official cheat program implemented this simple principle in a more ingenious way:

Instead of executing the script outside the dialog, the Stop Hook is implanted directly within the Claude dialog.

You assign Claude a task and a "completion flag".

Claude attempted to exit after completing the task.

If no completion flag is detected, the Stop Hook will intercept the exit and send the same prompt message back to the system.

This creates a "self-feedback loop":

Claude can see his previous output, error logs, or Git history in each round before trying to fix the problem.

Developer educator Matt Pocock describes this shift as a "paradigm shift" in AI programming:

From Waterfall development to true AI-driven Agile development.

You no longer need to pre-define a bunch of fragile execution steps, but instead:

  • AI autonomously "claims" a task card.
  • Find the next one yourself after you finish.
  • Continue this cycle until all tasks are completed.

The true power of the original Ralph lies not only in the "cycle" itself, but in the naive and persistent process of trial and error.

The most crucial point is that Ralph is not protected and error output is not "cleaned up".

It confronts the chaos head-on and admits defeat.

Behind this is an extreme but effective philosophy: if you keep exposing the model to its failures without any safety net, it will eventually "dream" the correct answer under pressure, just to break out of the vicious cycle.

Huntley's version emphasizes brute-force iteration and any means necessary; while Anthropic's version is based on a more moderate principle: failure itself is valuable data.

This is clearly stated in the official documents:

The cheat uses a special mechanism called Stop Hook to achieve self-feedback control—intercepting the AI's exit from the terminal and determining whether the task has been truly completed.

The cheat's execution mechanism is as follows:

  • Intercept Exit: When Claude believes he has completed his task and is ready to exit, the cheat program intercepts this action.
  • Verification completion flag: Detects whether the set <promise> (such as "passed all tests") has been output.
  • Feedback Injection: If incomplete, the plugin will incorrectly format the data as a structured data object and re-inject it into the AI ​​model to continue the attempt.

However, Anthropic's official Ralph Wiggum addon disappointed Dex, a collaborator of Geoffrey Huntley:

  • It's easy to crash if you don't add `--dangerously-skip-permissions`.
  • Hook installation location is unusual, State tracking files are hard to find
  • The logic is complex; deleting erroneous files could even cause the entire repository to spiral out of control.

More importantly, it misunderstood the essence of Ralph: Ralph should not "run forever," but rather "break down tasks into smaller parts, open separate windows, and work through them slowly."

So he still chose those 5 lines of Bash.

Ralph Wiggum's rise led to the demise of software development.

The entire developer community is only now beginning to realize the power of AI.

Ralph Wiggum has only recently become popular.

But most people don't realize that Ralph is just the beginning.

True advanced AI users have mastered technologies far more complex than Ralph's.

Moreover, they're not just making gadgets—they're using these technologies to replicate an entire company in just a few hours.

Michael Arnaldi started programming at the age of 11, initially to crack games.

Since then, he has written code at almost every level, from the core layer to the highest abstraction layer of TypeScript, and is now the founder and CEO of Effective Technologies.

He used to think that programming was everything in life. But now, all of that is over.

Most software developers are not even aware of the nature of this massive change.

They're obsessed with model debates: Is Claude better or GPT stronger? Has Gemini caught up? Can open-source models compete? Frankly, they've completely missed the point.

The key is the "process," not the "model." The model is just one part of the process.

Just like traditional software development: not all programmers need to be top-notch, but as long as the process is mature, ordinary developers can also make good products.

The same applies to AI programming:

A medium-sized model with an excellent process is far superior to a top-tier model with a chaotic process.

This is a disturbing fact: truly advanced practices are not being made public.

Advanced users don't share these technologies because they are too powerful and disruptive. We will eventually move towards openness, but it's not the right time yet.

Ralph is indeed a good starting point, but it has limitations.

Over the next two years, you'll start to hear more discussions about Lean, TLA+, and Agentic Infrastructure.

From programming intelligence agents to intelligent programming infrastructure, the entire software development industry will undergo a profound transformation.

He gave two examples:

  • He spent two hours creating a simplified, modern version of the Bloomberg terminal using Ralph;
  • One of his friends, a law student with almost no programming experience, completed a GDPR compliance detection tool by chatting with Claude Code.

To let the facts speak for themselves, he decided to open-source an accounting system called Accountability:

  • Supports cross-company, cross-currency accounting systems that comply with US GAAP standards.
  • A normal development team would need several months.

His plan to "Ralph" in his spare time is key: he deliberately avoids using any "black technology" or secret techniques.

It's simply a matter of using publicly available, basic technologies and applying them correctly.

But don't misunderstand: "Software development is dead" does not mean "Software engineering is dead".

Engineers are no longer "people who write code," but "people who build systems that can be written code."

They designed the technology roadmap, constructed the tools...

They can master a new tool in minutes—or at most a few hours.

This means that many of the best practices we have accumulated over the past 40 years are now outdated.

The team structure, development process, and technology stack selection all need to be restructured.

Individuals are becoming more powerful than ever before.

One person = the entire team in the past.

Software development is dead, engineering is being reborn, and AI will reshape everything.

Welcome to the new era.

Source
Disclaimer: The content above is only the author's opinion which does not represent any position of Followin, and is not intended as, and shall not be understood or construed as, investment advice from Followin.
Like
Add to Favorites
Comments