CoursesAI WorkshopCompaniesPricingBlogNewsletter
  • Courses
  • AI Workshop
  • Companies
  • Pricing
  • Blog
  • Newsletter
Subscribe

Subscribe to our newsletter

Don't miss the news that are truly worth it:

By subscribing you agree to the privacy policy
  • Courses
  • Companies
  • Communities
  • Blog
  • Gift card
  • Newsletter
  • Help
  • Shop
  • ConfAiBot
  • Contact
  • Legal notice
  • General conditions
  • Privacy policy
  • Cookies policy
What is the Ralph Wiggum Loop in AI for programming

What is the Ralph Wiggum Loop in AI for programming

22 January 2026

Subscribe to our newsletter

Don't miss the news that are truly worth it:

By subscribing you agree to the privacy policy

Hey there!

Summary of this email:

  • Inbox and Outbox pattern course published on Codely Pro Standard
  • The Ralph Wiggum AI programming loop
  • We're stopping the AI for devs workshop

⏱️ Estimated reading time: a couple of minutes.


📤 Inbox and Outbox pattern course published on Codely Pro Standard

The inbox and outbox patterns are two patterns that ensure a message (usually a domain event) has been delivered or sent.

The outbox pattern is the pattern that ensures a message is always delivered. To do so, we save the message to the database before publishing it.

The inbox pattern handles the other side: when consuming, it quickly saves it to the database to send an ack and then processes it later.

There are certain cases where applying them can be very useful, which is why we've made a course about these patterns, now fully available on Codely Pro Standard: Inbox and Outbox design patterns.


👃 The Ralph Wiggum AI programming loop

If you've opened Twitter lately, you've seen that everyone keeps talking about the Ralph Loop (it used to be called Ralph Wiggum, but due to copyright issues it's been renamed) for programming.

The Ralph Loop is a technique that keeps your AI agent working on a task (or a list of them) until it's 100% done.

Basically, it consists of launching our AI agent with this format:

> while :; do claude < PROMPT.md; done

If we analyze the little script, we'll see that we're:

  • In an infinite loop
  • Always reading what's in a PROMPT.md

The clever part is what's inside that prompt. The simplified content would be:

# List of tasks to complete

@tasks.json

# Progress made

@progress.txt

# Steps to follow 1. From the task list, select the highest priority one (it doesn't have to be the first one). IMPORTANT: Work only on that task. 2. Verify the task works. Run the tests and if applicable, open a browser to check there are no errors. 3. Update the tasks file marking the task as done. 4. Add the progress made to the progress txt. This is a good place to leave notes for the next person who's going to do the next task. 5. Commit all changes.

# Completion If you see there are no tasks left in the tasks json, write: COMPLETED

Here what we see is that we'll have 2 very important files:

  1. tasks.json: A file containing a list of tasks to complete. This could easily be a connector to JIRA, Linear, Notion, GitHub Issues...
  2. progress.txt: A file where the agent will leave notes about the tasks it completes that it finds relevant. It's useful so the next agent knows which task to work on.

The task loop will stop once there are no tasks left (we need to modify the little script so that if it sees the text <promise>COMPLETED</promise> it stops execution). We can also modify it to accept a parameter telling it how many tasks to complete.

The advantages of using this loop are:

  • Each iteration of the loop starts with a clean context. Therefore, there won't be context rot for each completed task.
  • The agent is 100% autonomous.

And obviously, this script can be improved to:

  • Fetch tasks from our task management system.
  • Create a branch for each one and a pull request. This way there's human in the loop to validate everything is correct.
  • Notify us each time it completes a task or runs out of them.
  • Add another agent in charge of reviewing the generated code.
  • And many more things we can think of.

That said, for this to work you need very solid foundations:

  • A test base with fast tests that verifies everything works.
  • A good architecture so that adding new features doesn't degrade code quality.
  • A linter/type checker/compiler that is fast.

This technique was published in July 2025, but it went viral just now because Anthropic launched a plugin to make it easy to do with Claude Code.

As of today, the plugin doesn't fully follow the spirit of the technique, since it doesn't clean the context and works somewhat opaquely using hooks.

What the plugin does have are interesting things we've applied: having the tasks json and a txt to write progress.

Our recommendation is to write the script by hand and iterate on it as needed.

If you want to learn more about these techniques and stay up to date, every Friday at 9am CET on Café con Codely we cover them. Live on our YouTube and Twitch. 😊


✨ We're stopping the AI for devs workshop

We're stopping the AI for devs workshop (for a few months).

It might not make sense:

  • Well-established format. We've done 11 editions (6 public and 5 exclusively for companies).
  • People like it and it delivers value. Average rating of 4.7 out of 5.
  • We've been updating it as we went along.

BUT...

We feel like:

  1. Focusing on Codely Pro for a while and reducing the number of things we manage in parallel.
  2. Letting some time pass for certain aspects to mature, like sub-agents. They have potential today but they're still not quite there.
  3. Preparing a v2 of the workshop, taking it up a notch.

Yesterday we held the sixth edition with people from Wallapop, BBVA, Kairós, Leadtech, Auctane, Dezero, Paired, S2Grupo, Plexus... it was a blast.

It has something that Codely Pro doesn't, which is being able to see the friction points in learning processes firsthand, resolve questions live... interaction, basically. We'll definitely keep exploring this format.

This was the last public edition we'll do for a while, but you can already sign up to be notified when we open new public editions.

Also, if you want an exclusive edition for your company, that option is still available. 😊 You can find the workshop information on our website!

Many thanks to everyone who invested in the workshop.


And since you've made it to this part of the newsletter, here's the joke of the week, which I know you were waiting for:

> Why do developers always complain at hotels? Because we can never find room 404! 😂 😂 😂

Cheers!

SubscribeSign in