Undo AI

Undo gives AI agents the runtime context they need to investigate complex problems and answer questions about what your program actually did. The agent replays an Undo recording, a deterministic recording of runtime execution, through Undo’s time travel debugging capabilities. As a result, the AI agent sees not just the source code, but the values the program produced, the paths it actually took, and the order in which things happened.

Recordings can be as long as the problem requires: the AI agent retrieves what it needs through Undo’s tools rather than reading the recording into the model’s context (see Long recordings and the model’s context).

Two ways to use it

You can use Undo from your AI agent or in UDB.

The How it works page describes the underlying mechanism and lists the kinds of investigation Undo can help with.

Your data and your IP stay with you

When you use Undo from your AI agent, all traffic stays between your machine and the LLM provider that your AI agent is already configured to use. Undo’s servers are not in the loop (except for the existing usage statistics), so anything you would already share with your AI agent, and only that, is what is shared.

For the files Undo writes on your machine, and what they contain, see What Undo AI reads and writes.

Requirements

The AI features of Undo require:

Warning

AI features are not enabled in every license. If the ai command in UDB or the undo mcp server reports that AI is disabled, contact support@undo.io to upgrade your license.

If AI is not available for your license, you can still use the simpler explain add-on from the Undo add-ons repository, which covers a subset of the use cases without requiring an AI-enabled license.

Choosing a model

The quality of an analysis depends heavily on the model behind your AI agent, and so does what the analysis costs you.

A model has to be able to drive tools reliably before it can use Undo at all. Older and smaller models often cannot, and they fail in ways that look like a problem with Undo rather than with the model: calling a tool with the wrong arguments, ignoring what comes back, or never calling one at all. We have seen good results with models such as Claude Sonnet 4.5+, Claude Opus 4.5+, or GPT-5.3+.

Above that floor, a cheaper model is not always cheaper. A more capable model tends to reach the answer in fewer steps and fewer tokens, so comparing prices per token can be misleading: what matters is the cost of a completed investigation. Models also differ most on long investigations, so a cheaper model that copes with a simple question tells you little about how it will do on a hard one.

Undo narrows the gap between models. Because its tools give the model facts about what the program actually did, instead of leaving it to infer them from the source code, a mid-range model used with Undo does better than the same model does without it. That is what makes a cheaper model a reasonable choice, but it does not lift a model that cannot drive tools.

This applies whenever you use Undo from an AI agent you configure yourself, including GitHub Copilot in Visual Studio Code. With the ai command, the model depends on which agent UDB starts; see config ai agent.