mrq + OpenAI Codex
Automatic snapshots for OpenAI's Codex CLI agent. Recover instantly when autonomous coding sessions go off track.
Why Codex Needs Backup Protection
OpenAI Codex is a terminal-based agentic coding tool that can read, write, and execute code autonomously. It operates with minimal human intervention, making decisions about how to implement features and fix bugs.
This autonomy is powerful but comes with risks:
- Codex can modify many files before you review changes
- It makes architectural decisions on its own
- The agent may interpret your request differently than intended
- Mistakes compound quickly without checkpoints
When a Codex session goes in the wrong direction, you need a way to revert quickly.
How mrq Works with Codex
Both tools are terminal-native. mrq monitors your file system in the background while Codex works. Every change is captured automatically.
# Terminal 1: Start mrq
mrq watch
# Terminal 2: Run Codex
codex "implement user authentication" Or use daemon mode to run mrq silently in the background:
mrq watch --daemon
codex "refactor the API layer" Recovery Flow
When Codex takes an approach you don't like:
$ mrq history
Recent Snapshots
────────────────────────────────────────────────────
16:45:23 abc123 Codex: Restructured authentication
+289 lines, -156 lines across 11 files
16:38:12 def456 Added session management
+78 lines, -23 lines across 4 files
16:32:45 ghi789 Initial auth module
+134 lines across 5 files
────────────────────────────────────────────────────
$ mrq restore def456
✓ Restored to snapshot def456
✓ Current state backed up as jkl012 If the restructuring wasn't what you wanted, you're back to the previous working state instantly.
Agentic Workflow Best Practices
Start mrq Before Codex Sessions
Run mrq watch --daemon before starting any Codex session. This ensures your initial state is captured.
Let Codex Be Ambitious
With mrq running, you don't need to constrain Codex's scope. Let it attempt large refactors. If the result isn't right, restore and try a different prompt.
Review Before Committing
After Codex completes a task, use mrq history to understand what changed. Browse the dashboard to see diffs before committing to git.
mrq vs Git with Codex
Codex doesn't automatically commit changes like Aider does. This means git won't help you recover unless you've been committing manually.
mrq provides continuous protection without requiring any action from you. See our comparison of mrq and git for more details.
Works with All AI Coding Tools
mrq monitors your file system, not specific tools. It works with:
- Cursor
- Claude Code
- Aider
- GitHub Copilot
- Windsurf
- And any other tool that modifies files
Get Started
npm install -g mrq-cli@latest
mrq login
mrq watch See the documentation for full setup instructions.
Code fearlessly with Codex
Automatic snapshots. Instant recovery. Let agents work without worry.
Get Started Free →