AI Loops: Agents Now Run Jobs Without Being Asked

Claude Code's creator runs AI agents that find tasks, fix them and submit PRs autonomously. He says this 'loop' shift is as big as the move from code to agents.

4 min readEAEvgenii ArsentevEvgenii Arsentev · PhD

Boris Cherny, the engineer who built Claude Code, described a pattern at Meta's @Scale conference that moves well past what most people think of when they hear 'AI agent.' He runs loops: multiple AI agents working in the background that don't wait for a task to be assigned. They scan a codebase, identify duplicated abstractions or other issues, fix them, and automatically submit pull requests — without Cherny approving each step or even knowing which tasks they picked up.

This is different from how most agentic AI works today. The standard model is transactional: you define a goal, the agent works on it, you check the result, and then you define the next goal. A loop removes that handoff cycle. The agent monitors its environment, decides what needs doing, acts, and keeps going — more like a process running in the background than a reply to a prompt. Cherny's assessment is blunt: "As big as the step from source code to agents was, loops are just as important and as big a step."

The 'Ralph Loop' — a practical technique already in use

One pattern that builders have developed to make long autonomous runs more reliable is called the Ralph Loop: after each completed action, the agent writes a brief summary of what it did, then explicitly checks whether the overall goal has been reached. This self-check serves a real purpose — it prevents models from losing track of the objective during extended sessions and helps catch situations where an agent has been doing work that technically completed but didn't actually solve the original problem.

What this means for how you'll work

The loop pattern aligns with a broader direction in AI development: the idea that throwing more computation at a problem until it's solved often beats trying to solve it in one step. This is the same logic behind extended thinking, o3-style reasoning models, and long agent runs. The difference with loops is that the work happens across time, in the background, without you in the room.

The practical catch is cost. Loops burn tokens continuously with no natural stopping point, and a swarm of agents running open-ended can generate a bill that surprises you. That's not a reason to avoid them — it's a reason to set a clear exit condition and a spend cap before you start. The builders who are learning to run loops sustainably now will have a meaningful workflow advantage as these capabilities become standard in tools like Claude Code.

What I'd actually do

Before running anything loop-like, do two things first. Write down the exit condition: exactly how will the agent know it's done? Then set a token or time limit so a long run can't go sideways silently. The Ralph Loop trick is worth adding to your prompts: after each action, ask the agent to write one sentence on what it did and confirm whether the goal is reached. It's a small addition that keeps a long autonomous run honest.

#AI агенты#Claude Code#автоматизация#agentic AI

Related guides

EAEvgenii Arsentev

Author

Evgenii Arsentev

PhD · Chief Product Officer at a tech company

Want to actually build this?

Guides explain. The free course transforms — personalized, gamified, and built to get you shipping fast.

◉ Start the free course

Source: techcrunch.com