Connect with us

AI

Andrew Ng’s Loop Engineering Letter Lays Out Three AI Coding Loops

Andrew Ng’s open letter lays out three nested loops for AI coding and explains why humans still hold the context advantage over current AI systems.

Published

on

Andrew Ng, the co-founder of Google Brain, published an open letter on X on June 30, 2026, breaking down loop engineering into three nested loops that frame how AI coding agents are actually being used to ship products. The X post pulled 578,511 views, 8,198 likes, and 1,563 retweets within the first day, according to the post’s own engagement metrics. It also pulled the most senior endorsement the term has had.

The phrase loop engineering had been spreading on developer Twitter after Claude Code’s Boris Cherny and OpenClaw’s Peter Steinberger publicly stopped writing prompts in favor of writing loops. Ng’s letter is the most senior endorsement yet, and it comes with a careful caveat. The human developer still holds the job the model cannot do. The point of the three loops is to give that job a name.

Where “Loop Engineering” Started

Two senior engineers publicly declared the death of prompting inside the same week in early June 2026, and the word they reached for was loop engineering. Boris Cherny, head of Claude Code at Anthropic, told a developer audience that he no longer prompts Claude by hand. His version of the new job is to design the system that does the prompting, not to write the prompts himself.

Peter Steinberger, the Austrian developer who created OpenClaw and has since joined OpenAI, said much the same in his own writing. “You shouldn’t be prompting coding agents anymore. You should be designing loops that prompt your agents,” Steinberger wrote, per developer Addy Osmani’s breakdown of the practice. The framing caught on because it captured a real shift in how engineers were actually using coding agents. By the time the term reached Ng, the conversation had been running for almost a month.

By the time Ng wrote his letter on June 30, 2026, the term had its own GitHub lists, its own hashtag, and a steady stream of replies to anyone who used the word. Cherny’s stop-writing-prompts moment drew its own write-up, and the agentic AI race the OpenClaw moment triggered had already pulled Meta, Google, and OpenAI into building their own agent products. Ng’s letter was the first time a Google Brain co-founder had weighed in on the conversation, and that was the part that made the three-loop framing land beyond developer Twitter.

Andrew Ng Lays Out Three Nested Loops

Ng’s letter is the first attempt to give the term an actual product framework. The three loops he names are designed to be nested, not interchangeable, and they map to the moment a developer stops being the typist and becomes the director. Ng published the full letter on X, and the same essay appeared a day earlier in The Batch, his newsletter. That timing mattered, since subscribers had the framework a full day before the X post made it public.

The first is the agentic coding loop. Given a product specification and an optional set of evals, an AI agent writes code, tests it, finds its own bugs, and keeps rewriting until the program passes its own checks. The second is the developer feedback loop, where the human steps in to steer the agent at a higher level, choosing features, redesigning the UI, and updating the spec when the agent goes off course. The third is the external feedback loop, which pulls in users, alpha testers, A/B tests, and production data to update the product vision. The vision in turn feeds the spec, and the spec in turn drives the agent, closing the chain.

The chain runs in one direction, with the spec feeding the agent, the agent’s output going back to the developer, and the developer’s vision getting updated by user data before the spec gets rewritten. Ng is clear that none of the three replaces the others. Removing any of them breaks the framework.

Each loop hands the next one a different artifact, with the agentic loop handing the developer a working build, the developer feedback loop handing the spec a clearer version, and the external feedback loop handing the product vision a new direction. That is also the order they need to run in.

Loop Owner Cadence
Agentic coding loop AI agent Every few minutes
Developer feedback loop Human developer Tens of minutes to hours
External feedback loop Users, alpha testers, production data Hours to weeks

The Three Clocks Behind the Loops

The clearest signal in Ng’s framework is that each loop runs on a different clock. That nesting is the point, since the inner loop can only optimise against a target the outer loop has set. The three clocks explain why the framework scales, and why the middle loop cannot be moved into the inner one without breaking the system.

Ng writes that the agentic loop “executes quickly. Every few minutes, the coding agent might build and test a new version of the software.” The developer feedback loop, by contrast, “operates over time intervals between tens of minutes and hours,” the same rhythm at which a developer might review a product and give feedback. The external feedback loop is the slowest of the three, “rarely taking less than hours and sometimes taking days or even weeks.” Each loop sets the rhythm of the one inside it. The slowest loop is the one the developer cannot afford to skip.

An Afternoon, a Typing App, and an Agent That Ran for an Hour

Ng’s worked example is a typing app for his daughter, built over a single weekend. He gave the agent a product description and stepped back. The agent wrote the code, opened a web browser on its own to inspect what it had built, retested, and reported back.

“My coding agent could easily work for around an hour, using a web browser to check what it had built multiple times before getting back to me, without needing my intervention,” Ng writes. He is clear that the hour is not a marketing figure. The agent was checking its own work, not waiting for him. The agent was running its own browser checks and test passes while Ng was making the higher-level calls.

While the agent ran, Ng made the higher-level calls. He changed the visual design more than once, picked the cat costumes his daughter could unlock as she progressed, and rewired the grown-up login flow that lets a parent steer the child’s practice. None of those were prompt tweaks, since they were product decisions made after the agent had already shown him an implementation.

The typing app is small. The implication is not. Once an agent can hold a working build for an hour without supervision, the question stops being whether the developer types each line and becomes what the developer does with the hour. Cherny’s version of the same shift is blunter, since he is no longer in the prompt business at all.

I don’t prompt Claude anymore. I have loops running that prompt Claude and figuring out what to do. My job is to write loops.

Boris Cherny, head of Claude Code at Anthropic, in remarks cited by developer Addy Osmani in his write-up of the loop engineering practice.

The Job Ng Refuses To Hand the Agent

Ng is explicit that the middle loop cannot be automated. AI-native teams, he writes, are already using AI to gather usage data, summarise customer feedback, and run competitive analysis. None of that erases the human’s job. “I see humans as having a significant context advantage over current AI systems,” Ng writes, and that advantage comes from knowing more about the users and the context the product has to operate in than the model does. He prefers the phrase “context advantage” to the looser industry word “taste,” he adds, “since that gives us a clearer path to helping AI systems get better.”

The implication for engineering teams is direct. Last year, Ng says, a lot of developers, himself included, were acting as manual QA for their own coding agents, finding bugs by hand and then asking the agent to fix them. With coding agents able to test their own code, that work has shrunk.

What replaced it is what Ng calls the building half of the developer’s new job, translating a product vision into a precise spec, then updating that spec when the agent shows you something close but not right. If the agent keeps hitting the same wall, the right move is to build evals, datasets the agent will be measured against. The work has moved up the stack, but it has not disappeared. Ng closes the loop on that point directly in the last paragraph of the letter.

So long as the human knows something the AI does not, human-in-the-loop is needed to to inject that knowledge into the system.

Andrew Ng, co-founder of Google Brain, in his June 30, 2026 open letter on X.

Why the Letter Took Off on Developer Twitter

Ng’s thread drew the audience it did because loop engineering had been a developer-Twitter argument without a senior validator. The post changed the temperature of the discussion. Three senior engineers, Cherny, Steinberger, and now Ng, had converged on the same vocabulary in the space of a month.

The engagement on the X post, including a high reply count, was what made the three-loop framing travel beyond the usual AI-founder audience. Critics asked whether this is just a rename of the software development lifecycle with new vocabulary, and whether the methodology only works for engineers who can afford $200-a-month frontier subscriptions. Builders pointed to tools that make long agent runs recoverable across tests and failures. Enterprise readers asked Ng on X whether the external loop in a regulated environment includes policy, governance, and audit, not just consumer A/B tests.

The Batch, Ng’s newsletter, published the same letter a day before the X post, so subscribers had already seen the framing. The X post did not announce a new product. It packaged a methodology around a moment the developer internet was already arguing about. It gave the argument a vocabulary sharp enough to be quoted, restated, and argued with. The point was to give the discussion an anchor, not a verdict.

The numbers behind the post explain the reach. The post’s engagement count crossed half a million views in a day. Replies outpaced the typical retweet-to-reply ratio on AI-founder posts, which is the signal that the framework is being argued with, not just broadcast.

  • 578,511 views: Andrew Ng’s June 30, 2026 X post on loop engineering, per the post’s own engagement count
  • 8,198 likes, 1,563 retweets, 363 replies: same post

Frequently Asked Questions

What is loop engineering?

Loop engineering is the practice of building the system that prompts an AI coding agent, instead of typing each prompt yourself. Developer Addy Osmani describes a loop as a recursive goal where the agent iterates on its own work until a verification gate passes. Andrew Ng’s open letter on June 30, 2026 extended the same idea to the whole product, not just the coding step. That is the difference between loop engineering as a developer trick and loop engineering as a product framework.

Who coined the phrase “loop engineering”?

Two engineers publicly declared the death of prompting in the same week in early June 2026, with Boris Cherny, head of Claude Code at Anthropic, and Peter Steinberger, the Austrian developer who created OpenClaw and has since joined OpenAI, being the two who made it stick. Andrew Ng, the co-founder of Google Brain, said in his June 30, 2026 open letter that the phrase is a hot buzzphrase after their remarks went viral on social media. The credit for the term itself is harder to pin down, since both engineers were paraphrasing a practice that was already common in agent harness engineering.

What are the three loops in Andrew Ng’s letter?

The agentic coding loop runs without the developer. The developer feedback loop is where the human steers the agent, translating vision into spec. The external feedback loop is where users, alpha testers, and A/B tests feed back into the product vision. The point of the framework is that the three loops run on different clocks and on different owners, which is what makes the framework a system and not just a workflow. Skipping the middle loop is the most common mistake Ng’s letter warns against.

Does Andrew Ng say AI will replace developers?

No. Ng argues the opposite, since humans keep the job the model cannot do. In his June 30, 2026 letter, he wrote that humans have a significant context advantage over current AI systems, and that this advantage is the reason human-in-the-loop work remains necessary. He prefers the phrase “context advantage” to the looser industry word “taste.”

When did Andrew Ng publish the loop engineering letter?

Ng posted the letter on X on June 30, 2026. The same essay appeared a day earlier in The Batch, Ng’s newsletter for AI practitioners. The X post collected 578,511 views, 8,198 likes, 1,563 retweets, and 363 replies. Ng has said he will write more in future posts on how to balance building against user feedback as engineers take on more of the product role.

Logan Pierce is a writer and web publisher with over seven years of experience covering consumer technology. He has published work on independent tech blogs and freelance bylines covering Android devices, privacy focused software, and budget gadgets. Logan founded Oton Technology to publish clear, no nonsense tech news and reviews based on real hands on testing. He has personally tested and reviewed dozens of mid range and budget Android phones, written extensively about app privacy, and built and managed multiple WordPress publications over the past decade. Logan holds a bachelor's degree in English and studied digital marketing at a certificate level.

Continue Reading
Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Trending