Hardik's Notes · AI, simply

AI agents need an undo button. Here is one idea.

AI agents can make mistakes you cannot take back. A new open-source tool saves every step like Git, so a manager agent can undo one and try again.

A small purple robot sits at a wooden desk with yellow boxes, holding a big paper arrow. A taller purple robot stands behind it and watches.

What is the problem?

A chatbot only writes words. An agent does things. It might delete files, send a message or run a program.

Spectrum reported on 19 November 2026 that agents have already done this: deleted a whole email inbox, hacked websites and launched cyberattacks. One cannot take such steps back.

What is Shepherd?

Shepherd is a Python tool from Northeastern University and Stanford University. The paper first appeared on 11 May 2026. Spectrum covered it on 19 November.

It treats an agent’s run like a Git project. Every action becomes a saved step (a commit). The step also keeps the state around it, such as the files or the inbox.

Then a second AI, the manager (the paper calls it a meta-agent), can watch the worker agent. If a step looks buggy, it can go back one step. It can also fork (copy the run) and try a different path.

Plain agent

  • Acts straight on the real world
  • A bad step may stay
  • You see only the log afterwards

Agent with a manager

  • Acts inside a sandbox (a safe copy)
  • A bad step can be reverted
  • A manager can watch every step

Why is the sandbox important?

The worker thinks it is in the real world. It “sends” an email. But the sandbox catches it. A manager agent or a person then decides whether it is really sent.

Derek Chong, a Stanford researcher on the team, described it this way to Spectrum.

Does it work?

The team tried it on two coding agents working in parallel on one project. On their own, the pair passed about 29% of the tests. This is the authors’ own experiment, on a test called CooperBench with 479 pairs.

29% to 55%

share of tests passed by two coding agents, without and with a manager agent (the best manager)

Shepherd paper, authors' own test

One agent doing both jobs alone passed about 57%. So the manager closed most of the gap between two agents arguing and one agent alone.

What’s the catch?

  • It is a preprint (shared before review). The results are the authors’ own.
  • The manager was a larger model than the workers. That costs more.
  • Spectrum says the team is still moving it from alpha to a finished tool.
  • A manager can also be wrong. It lowers the risk but does not remove it.

Try it

Think of any tool that acts for you, such as a bot that renames files. Ask three things. Can I see each step? Can I undo it? Does it ask before something permanent? If the answer is no, run it on a copy first.

Sources

Beyond the notebook

This is what we do in schools.

A year-long programme for classes 6 to 12. Creativity, taught as a skill, inside the classroom you already have, led by your teachers.

See the programme