AI bug reproduction: debug session replays with Claude and Codex
Let your agent replicate the bug for you. TraceUX now turns a recorded browser session into an AI-ready JSON file you can give to Claude, Codex, or another file-reading agent. The export carries the technical evidence behind the replay: what was displayed, which elements changed, where the user clicked, and which browser errors were captured.
Your best bug report starts with the recording. Give your agent the captured session and access to your project’s code, styles and assets. TraceUX provides the flow; the agent repeats it in the locally running app and verifies the result.
From a session replay to AI bug reproduction
A report such as “checkout is broken” leaves an agent guessing about the route, viewport, open dialog and failing action. A session recording preserves the sequence. Export for AI makes that sequence available as structured data alongside browser logs, tracked actions, tickets and feedback when present.
This is a bug replication workflow based on recorded evidence. The JSON includes the raw rrweb event stream used by TraceUX playback, so an agent can examine DOM snapshots, apply mutations, resolve a clicked node and correlate an error with its timestamp.
Export the session in a few steps
Open a recording in TraceUX and choose Export for AI beside Delete. The server prepares the file in the background, showing actual chunk progress and a Cancel export action. The complete JSON downloads automatically when ready.
Preparation runs one export at a time and pauses between chunks to reduce CPU pressure. The file limit is 64 MiB and background preparation is limited to five minutes. A limit produces a clear failure instead of silently removing events.
- Locate the session and the interaction you want to investigate.
- Choose Export for AI and let preparation finish.
- Attach the downloaded JSON to an agent with access to the original project, including its source code, styles and assets.
- Ask the agent to run your app locally, repeat the recorded flow in a browser, and verify the same visible behavior and errors.
What Claude or Codex receives
The JSON is designed to be understandable without a separate TraceUX manual. It identifies its format and carries a format_guide explaining event types, timestamp units, DOM reconstruction, node IDs and click coordinates.
| Evidence | Why it matters |
|---|---|
| DOM snapshots and mutations | Reconstruct page content, opened modals, expanded menus and error messages. |
| Click targets and x/y coordinates | Connect an action to its actual element and viewport location. |
| Pages, viewport and scroll events | Reconstruct navigation and what part of the interface was in view. |
| Browser logs and custom events | Correlate timestamps, error messages and application-provided context. |
| Related tickets and feedback | Read the visitor report alongside the technical evidence. |
| Embedded format guide | Interpret the recording without database access or an MCP server. |
How your agent reproduces the recorded flow locally
Consider a recorded checkout flow: the user opens a confirmation modal, clicks Pay now, sees a payment timeout, closes the modal, then reopens it. TraceUX supplies that sequence, its timestamps, click targets and coordinates, DOM changes, and matching browser logs.
The agent reads the embedded format_guide and maps that evidence to the original project’s components and routes. It uses your code, styles and assets to start the real application locally, then uses a browser to perform the same actions. The export is the evidence for the flow; your repository supplies the runnable interface.
Give the agent the project’s startup commands, required environment configuration, and safe test data or test services. It should reproduce the relevant viewport and starting page, open the same modal, click the same control, and compare the visible result and logs with the recording. Click coordinates provide context; matching elements in the local app is more robust than clicking coordinates blindly.
The agent must verify that the same failure actually occurs locally before claiming reproduction. If the failure depends on missing account state, backend responses, credentials or external services, it should identify that gap. A simulated timeout can help test a hypothesis, but it is not proof that the original cause has been reproduced.
A prompt to use with Claude, Codex or your preferred agent
Read this TraceUX session JSON and its embedded format_guide. Reconstruct what the user saw and clicked, including modal changes and matching browser errors. Give me reproduction steps with timestamps and target elements. Use this project’s original code, styles and assets to run the app locally and repeat the recorded flow. Verify the same visible behavior and matching errors, investigate the cause, distinguish observations from hypotheses, and identify any missing evidence.
An agent needs file-reading capability and enough context or file-query tools for a long recording. To reproduce the flow locally, it needs access to the project and a browser it can control. An rrweb-compatible replayer is useful for inspecting the captured session, but the agent reproduces the bug in the locally running application. There is no automatic connection to an AI provider: you choose the file and the tool you share it with.
Verify the reproduction against the captured evidence
The recording reconstructs the captured interface, rather than bundling a running copy of your application. Masked values remain masked. External images, fonts or styles must still be accessible for a complete visual match. Application source, backend state, API responses and network conditions are not guaranteed to be included.
No tracker npm update is needed for this feature. Update the TraceUX server and dashboard to get the export action. Existing trackers already capture the stored replay data it uses.
Turn a recording into your next AI debugging context
Export the session, give your agent the evidence, and verify what happened with concrete reproduction steps.
Explore Export for AIExplore TraceUX →