Last Tuesday, I spent two hours in a Claude Code session refactoring an authentication module. Somewhere around the 45-minute mark, the AI suggested an elegant approach to token rotation that I had never considered. It was one of those moments where you think, "I need to remember this."
I did not remember it.
By the time I went looking, the terminal had scrolled past it. The conversation was a wall of text with no structure. The reasoning behind the change, the back-and-forth that shaped it, the intermediate states of the code -- all gone. Dissolved into the void of my scrollback buffer.
If this sounds familiar, keep reading.
The Problem Nobody Talks About
AI coding assistants have changed how I work. Claude Code for backend logic, Cursor for frontend iteration, Gemini CLI for quick prototyping. The productivity gains are real and significant. But there is a glaring hole in the workflow that nobody seems to address:
AI coding sessions are completely ephemeral.
Think about it. Every other creative tool has history, undo, and review built in. Video editors have timelines. Design tools have version history. DAWs have session recall. But AI coding sessions? You get a chat window that scrolls into oblivion.
Git tracks what changed, but not why. Your commit message says "refactor auth module," but it does not capture the fifteen exchanges where you and the AI debated three different approaches, rejected two, hit an error on the third, pivoted, and finally arrived at something good. That decision-making process -- the most valuable part of the session -- just vanishes.
This creates real problems:
- You cannot debug AI mistakes. When a coding assistant introduces a subtle bug, good luck tracing back through a linear chat scroll to find the exact moment it went off the rails.
- Code review is incomplete. Your teammate's PR shows the diff, but you have no idea how the AI got there. Did the developer accept the first suggestion blindly, or did they iterate carefully?
- Knowledge is lost. That clever solution the senior dev built with AI assistance last week? It is trapped in their terminal history, inaccessible to anyone else on the team.
- Cross-tool context is fragmented. If you used Claude Code for the backend and Cursor for the frontend in the same feature, the context is split across two completely separate histories.
I got frustrated enough to build something about it.
Enter Mantra: Time Travel for AI Coding Sessions
Mantra records your AI coding sessions and reconstructs them into navigable timelines. Think of it like scrubbing through a video, except the video is your coding session.
It is not a screen recorder. It captures the structured data -- prompts, responses, tool calls, file changes -- and lets you move through them on a timeline. You can jump to any point, see what the AI was doing, what files looked like at that moment, and understand the flow of decisions that got you from point A to point B.
The core idea is simple: AI coding sessions are complex artifacts, and we deserve real tools for reviewing them.
How It Works (3 Steps)
The setup is deliberately minimal:
Step 1: Code as you normally do. Use Claude Code, Cursor, Gemini CLI, or Codex. Change nothing about your workflow. Mantra sits in the background and indexes your sessions automatically.
Step 2: Open Mantra when you need to look back. You get a unified timeline of all your sessions across all your tools. Everything in one place, searchable and structured.
Step 3: Scrub through any session like a video. At each point on the timeline, you see the prompt you gave, the AI's response, and the exact code diff -- all synchronized. Jump to the moment the bug was introduced. Find that clever pattern from last week. Replay the entire decision-making process.
That is it. No configuration files to edit, no proxying, no monkey-patching your AI tools.
Where This Gets Genuinely Useful
I have been dogfooding Mantra for a while, and the use cases that stuck surprised me.
Debugging AI-introduced bugs. This is the killer use case. When something breaks and you suspect the AI made a wrong turn three sessions ago, you can scrub backward to the exact point where it misunderstood your intent. No more guessing, no more git bisect through AI-generated commits hoping to find the culprit.
Better code reviews. When someone on your team ships a big AI-assisted PR, the diff only tells you what changed. Replaying the session gives reviewers the narrative: "The AI suggested X, the developer pushed back, they settled on Y because of Z." It is a fundamentally richer review artifact.
Personal recall. The most mundane use case and honestly the one I use most. "What was that thing I did last Thursday?" Scrub through Thursday's sessions, find it in 30 seconds instead of 30 minutes.
Cross-tool search. My Claude Code sessions and Cursor sessions show up in the same workspace. I can finally search across all of them at once instead of jumping between chat histories.
Privacy: Your Data Stays on Your Machine
This was non-negotiable for me. Mantra runs locally. No cloud sync, no account creation wall, no telemetry on session content. Your AI conversations stay on your laptop unless you explicitly choose to export them.
It also ships with built-in content redaction, so when you do want to share a session -- for a code review or a postmortem -- you can strip API keys, credentials, and proprietary code first.
The Practical Details
- Supported tools: Claude Code, Cursor, Gemini CLI, Codex
- Platforms: macOS, Windows, Linux
- Current version: v0.9.1 (pre-1.0, actively developing)
- Architecture: Local-first, no cloud required
It also includes an MCP Hub for managing Model Context Protocol servers across your AI tools, and a Skills Hub for sharing prompt templates -- but the session replay is the core of why I built it.
Try It Out
I am offering lifetime free access to the first 50 users. Not a trial, not a "free tier with limitations" -- full access, forever. I want real feedback from developers who push AI coding tools hard, and the best way to get that is to remove the price barrier entirely for early adopters.
If something is broken, file an issue on GitHub. If you want to chat about it, join the Discord. And if you think the whole premise is wrong, I genuinely want to hear that too.
We are in a moment where AI coding tools are powerful but the workflows around them are still immature. I built Mantra because I needed it. If you need it too, that is the signal to keep going.
Top comments (0)