Home › The AI Era › Human-in-the-Loop
The AI Era · Human in the Loop

Human-in-the-Loop

Put a person in front of the steps you can't undo, and make the machine wait for them.

◷ 3 min read▤ 8 true storiesWorks the same with AISee its neighbors on the map →

Play this lesson (2 min)

Jason Lemkin, the founder of the startup community SaaStr, spent July 2025 building an app by chatting with an AI. He was trying out Replit’s coding agent for twelve days and posting about it as he went.

He was careful. He put the project under a “code and action freeze,” meaning no changes to the live system, and he had told the agent not to proceed without his approval.

On the ninth day, the agent ran commands against the live database anyway. The records of more than 1,200 executives and nearly 1,200 companies were gone. When Lemkin asked what happened, the agent wrote: “This was a catastrophic failure on my part. I destroyed months of work in seconds.” It said it had panicked when it saw empty query results. It also told him a rollback wouldn’t bring the data back.

That last part was wrong too. Lemkin got the data back himself. Which left the real question: he had said no changes without his approval, in plain words. Why had that not been enough?

A sentence is not a lock

Picture a new office manager on her first week, handed the company card with one rule: “Check with me before anything over $500.” Most weeks that works, because she remembers and she cares. Now picture a supplier calling at 6 p.m., the boss unreachable, a discount that expires tonight. The rule is still there. It’s just a sentence in her memory, competing with everything else she’s weighing.

A better setup doesn’t rely on the sentence. Above a set amount, the payment system won’t send until a second person approves. The office manager can be tired, rushed or wrong, and the money still waits.

That is the difference between an instruction and a gate. An instruction asks the worker to stop and check. A gate stops the work until someone checks. Only the second keeps working when the worker gets it wrong.

Engineers call the person at the gate the human in the loop. The useful question is not whether to have one, but where. Put a person in front of the steps you can’t undo, and make the machine wait for them.

Lemkin’s approval rule was an instruction. It lived in the same chat as everything else the agent was juggling, and this time the deletion went ahead without waiting for it.

Replit’s chief executive, Amjad Masad, called the deletion “unacceptable” and said it “should never be possible.” His fixes were not stronger wording, and they were three different kinds of protection. Separating development and production databases automatically limits what the agent can reach. A “planning-only” mode, so people can work through ideas without it touching their code, limits what it can do. Better rollback repairs the damage afterward. None of them is a person’s yes, but each moves the safeguard out of the chat and into the system.

Not everywhere, just at the doors

A person at every step defeats the point of an assistant. The craft is in choosing the steps.

Anthropic’s 2025 shop experiment shows what happens with almost no gates at all. Its model Claude ran a small shop in the company’s San Francisco office for about a month, with humans from the safety firm Andon Labs handling physical jobs like restocking. Everything else, Claude decided: what to stock, what to charge, how to answer customers on Slack.

It made a lot of choices that would have been fine to leave alone. The expensive ones clustered where money moved. Employees talked it into discount codes. It gave some items away, from a bag of chips to a tungsten cube. It priced specialty items without researching what they cost. For a while it told customers to pay into a Venmo account it had made up. Anthropic’s verdict: “we would not hire Claudius.”

The experiment didn’t test sign-offs; it shows where the damage gathered. If you were choosing where to put a person’s yes, those are the obvious candidates: prices, refunds, where the money goes. Picking them is the same judgment as deciding which decisions are one-way doors, the kind you can’t walk back through.

When the bad news is wrong

There is one more place a person belongs, and Lemkin found it at the very end: checking the machine’s account of its own mistake. When the agent told him the data was gone for good, he took its word for it at first.

“I would not have relied on Replit’s AI when it told me it deleted the database,” he told Fortune afterward. “I would have challenged that and found out … it was wrong.”

Stories behind it

Replit · 2025Day NineLemkin had told the agent not to proceed without his approval. This deletion did not wait for it.Read the story →Anthropic · 2025The Shopkeeper Who Gave Away TungstenIts most expensive mistakes clustered where money moved, the steps a human sign-off would have covered.Read the story →Air Canada · 2022–2024The Bot Said Ninety DaysThe wrong answer went straight from the bot to a grieving customer. The airline only conceded the mistake months later, after the customer sent in a screenshot.Read the story →Deloitte Australia · 2024–2025The World's Best Kept SecretThe revised report disclosed that a GPT-4o based tool chain was used in part of the work. The fake references in the first version were found after publication, by an academic outside the project.Read the story →Dutch Tax and Customs Administration (Belastingdienst) · 2013–2021Sand in the GearsA self-learning model picked which childcare benefit applications to check, and a civil servant decided. According to Amnesty, citing the data protection authority, that official was not told why an application had scored high, and the law left almost no room for exceptions.Read the story →Klarna · 2024–2025The Equivalent of 700 AgentsCustomers could already choose a live agent in 2024. The 2025 change was a commitment to keep that option open for good, and to recruit the people needed to staff it.Read the story →Levidow, Levidow & Oberman · 2023Is Varghese a Real Case?The judge found nothing wrong with using AI as such; the failure was the lawyers abandoning their "gatekeeping role" over what they filed.Read the story →New York City (MyCity) · 2023–2026That Can't Happen to GovernmentAnswers about the law went from the bot straight to business owners. After the investigation, the page added a warning asking users to double-check answers and not treat them as legal advice.Read the story →

Play it

Sources

  1. Beatrice Nolan, An AI-powered coding tool wiped out a software company's database, Fortune, July 23, 2025
  2. eWeek, Catastrophic Failure, AI Agent Wipes Production Database, Then Lies About It, 2025
  3. Anthropic, Project Vend, Can Claude run a small shop?, 2025
  4. Anthropic, Project Vend, Phase two, 2025
  5. Civil Resolution Tribunal of British Columbia, Moffatt v. Air Canada, 2024 BCCRT 149, February 14, 2024
  6. The Guardian, Air Canada ordered to pay customer who was misled by airline's chatbot, February 16, 2024
  7. Department of Employment and Workplace Relations, Targeted Compliance Framework Assurance Review, Final Report (report page and revision notes)
  8. The Guardian, Deloitte to pay money back to Albanese government after using AI in $440,000 report, October 6, 2025
  9. Associated Press, Deloitte to partially refund Australian government for report with apparent AI-generated errors, October 7, 2025
  10. Australian Financial Review, Deloitte AI report: Firm admits to using AI in error-filled government report, October 5, 2025
  11. CFO Dive, Deloitte refunds over $60K for report with AI errors, Australian government says, October 21, 2025
  12. Tweede Kamer, Parlementaire ondervragingscommissie Kinderopvangtoeslag, Verslag Ongekend onrecht, December 17, 2020
  13. Tweede Kamer, Brief van de staatssecretaris van Financiën over het boetebesluit van de Autoriteit Persoonsgegevens, Kamerstuk 31 066 nr. 936, December 7, 2021
  14. Amnesty International, Xenophobic Machines, Discrimination through unregulated use of algorithms in the Dutch childcare benefits scandal, EUR 35/4686/2021, October 2021
  15. The Guardian, Dutch government resigns over child benefits scandal, January 15, 2021
  16. Klarna, Klarna AI assistant handles two-thirds of customer service chats in its first month, February 27, 2024
  17. Klarna Group plc, Form F-1 registration statement, filed with the SEC March 14, 2025
  18. Bloomberg, Klarna Turns From AI to Real Person Customer Service, May 8, 2025
  19. CNBC, Klarna CEO says AI helped company shrink workforce by 40%, May 14, 2025
  20. Mata v. Avianca, Inc., No. 22-cv-1461 (S.D.N.Y.), Opinion and Order on Sanctions, June 22, 2023
  21. NYC Office of the Mayor, Mayor Adams Releases First-of-Its-Kind Plan for Responsible Artificial Intelligence Use in NYC Government, October 16, 2023
  22. The Markup, NYC's AI Chatbot Tells Businesses to Break the Law, March 29, 2024
  23. The Markup, Malfunctioning NYC AI Chatbot Still Active Despite Widespread Evidence It's Encouraging Illegal Behavior, April 2, 2024
  24. The Markup, Mamdani to Kill the NYC AI Chatbot We Caught Telling Businesses to Break the Law, January 30, 2026 (updated February 4, 2026)