This video demonstrates a novel approach to rapid codebase exploration by integrating AI coding agents with time-travel debugging. Using Undo AI's Live Recorder, a program's entire execution (e.g., Chocolate Doom gameplay) is captured as an instruction-precise trace. An AI agent, like Claude Code, then leverages this deterministic execution history, driven by Undo's UDB time-travel debugger, to answer natural language queries about program behavior. The AI navigates recorded states, identifies significant variable changes, and pinpoints the exact lines of code responsible for specific outcomes, providing detailed explanations and contextual information without disrupting a live debugging session. This workflow aims to significantly accelerate understanding of large or unfamiliar codebases, onboarding processes, and the investigation of complex program behaviors.
Learn a New Codebase Fast with AI Agents (Undo AI + UDB)
0:00 Introduction to AI and Time Travel Debugging: The video introduces using AI and time travel debugging (specifically Undo's Live Recorder and UDB) to explore complex codebases, demonstrated with the Chocolate Doom source code.
0:15 Instruction-Precise Execution Trace: Undo's Live Recorder captures the entire execution of a process, providing an instruction-precise trace of every executed line of code, thread, variable, and memory location, allowing for arbitrary queries about program execution.
0:41 AI for Code Exploration (Claude Code): The demonstration uses Claude Code, an AI coding agent, integrated with Undo AI to answer natural language questions, such as identifying when the second zombie was killed in the Doom playthrough.
2:05 AI Drives Time Travel Debugger: The AI agent acts as the engine, taking control of the UDB time travel debugger to navigate the recorded program history, exploring variables like total kills and kill count to pinpoint relevant events.
2:40 Navigating Execution History: The AI can directly skip to interesting changes in data values and program states within the deterministic recording, providing a "ground truth" context for its analysis and preventing disruption to a live debugging session.
3:40 Finding the Root Cause and Context: The AI explores related program states, bookmarks significant points in time (e.g., the first and second zombie kills), and can travel back and forth to collect comprehensive contextual information to provide a thorough explanation.
4:27 Comprehensive Explanation and Bookmarks: The AI delivers a detailed summary of its findings, including precise timestamps, code locations, and object types (e.g., "empty possessed" for a zombie), and creates persistent bookmarks in the recording for user verification or further investigation.
4:30 Accelerated Understanding and Onboarding: The combination of AI reasoning and time-travel debugging offers a powerful method to learn, explore, and understand new codebases more efficiently, accelerating developer onboarding and complex task investigations beyond traditional debugging methods.