Undo for Java AI

Undo for Java 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 the program’s 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.

An AI agent debugging a recording is not limited to a fixed script. It follows the same strategies a developer would: go to the failure, inspect the state, and execute backwards to the cause. It is equally at home collecting data across a whole recording, for instance sampling stacks to explain where the time went. What you can ask AI to do gives a flavour of what you can ask for.

Ways to use it

  • From your AI agent. Undo for Java ships MCP servers that let an AI agent such as Claude Code, Claude Desktop, or Codex drive the debugger itself. Register lr4j_mcp to debug a single recording, or lr4j_mcp_server to let the agent open recordings as the conversation requires, including several at once. See The MCP Server for setup and a reference of the available tools.

  • Autonomously, with the bundled agent skill. The distribution includes an agent skill that teaches an AI agent the complete workflow: make a recording, replay it, and debug it to a root cause, without a human driving each step.

  • From Python. The Python API drives the same debugger from scripts, for batch analysis or use in CI.

The agent skill

Added in version 10.0.

$LR4J_HOME/skills/undo-java/ contains an agent skill (in the SKILL.md format used by Claude Code and compatible agents) covering the end-to-end workflow:

  • making a recording, including controlling when recording starts and stops, skipping application startup, and recording long-running services;

  • replaying a recording, including setting up the MCP server if it is not already registered;

  • debugging recipes that run from a reported failure to a root cause, such as reverse execution from an exception, and using thread fuzzing to provoke concurrency bugs.

With the skill installed, you can ask an AI agent to “record this program and find out why it crashes” and leave it to carry out the whole loop itself.

To install it, copy or symlink the skills/undo-java directory into your agent’s skills directory (for Claude Code, .claude/skills/ in your project or ~/.claude/skills/), or simply point the agent at the directory.

Your data stays with you

Recordings are replayed locally, on your machines. When an AI agent debugs a recording, traffic flows between your machine and the LLM provider that the agent is already configured to use; Undo-hosted servers are not in the loop.

Requirements

The MCP servers and the Python API need a valid license key file, passed with the --key option. If you don’t have one, contact Undo Support.