Restore previous conversation states during AI coding sessions. Rewind to any earlier point in the dialogue to retry, branch, or recover from mistakes.
scorpiox-rewind is a session management tool that lets you rewind an AI-assisted
coding conversation to a previous state. When working with scorpiox-code,
your conversation evolves as you make edits, ask questions, and iterate on solutions.
Sometimes you need to go back — perhaps the AI went down a wrong path, you want to try
an alternative approach, or you accidentally confirmed a destructive change.
The rewind tool captures conversation checkpoints and allows you to restore any earlier
state, effectively giving you an "undo" for your entire coding dialogue. It works by
reading session state files managed by scorpiox-conv and
scorpiox-emit-session, selecting a target checkpoint, and atomically
replacing the active conversation state.
| Flag | Short | Description | Takes Value |
|---|---|---|---|
| --help | -h | Show help message and exit | No |
# Show help and available options
scorpiox-rewind --help# Rewind the current conversation to the previous state
# (restores the last checkpoint before the current turn)
scorpiox-rewind
✓ Rewound conversation to checkpoint #14 (2 turns back)
Restored state: 3 files modified, 127 lines changed# Use inside a scorpiox-code session when the AI takes a wrong approach
# Step 1: You notice the AI refactored your code incorrectly
# Step 2: Rewind to before the refactor started
scorpiox-rewind
✓ Rewound conversation to checkpoint #8
Session restored — you can now give the AI a different instruction# Rewind is non-destructive — the forward states are preserved
# You can inspect what was rewound via the transcript tool
scorpiox-transcript --last 5
#12 [user] "refactor the auth module to use JWT"
#13 [agent] modified auth.py (+84 -31)
#14 [agent] modified middleware.py (+12 -3)
#15 [user] "actually, let's keep session tokens" ← current
scorpiox-rewind
✓ Rewound to checkpoint #11# Combine with scorpiox-conv to manage multiple conversation branches
scorpiox-conv list
active: conv_a3f8 (15 turns, 2.1 KB)
saved: conv_91dc (8 turns, 0.9 KB)
scorpiox-rewind
✓ Rewound conv_a3f8 to checkpoint #12