Describe the feature or problem you'd like to solve
/undo and /rewind are documented, but there is no documented way to redo after rewinding too far. If a user accidentally undoes one turn too many, they have to recover by manually reconstructing state from session history, editor local history, git history, or by rerunning the original prompt.
Proposed solution
Add a complementary /redo command that steps forward through the rewind stack created by /undo and /rewind, restoring the reverted turn and its file changes until a new action invalidates the redo stack. This would make rewind safer to use, reduce accidental loss of work, and align with common editor and terminal expectations.
Example prompts or workflows
- Use
/undo to inspect the state before the last turn, realize it was one step too far, then run /redo to restore that turn.
- Rewind several turns while comparing alternative outputs, then step forward one turn at a time with
/redo.
- Accidentally use
/undo twice, then recover without needing /resume, session history, or rerunning the original prompt.
- Use
/undo after a broad code change, confirm the change was actually desired, then /redo to restore it intact.
Additional context
A standard undo/redo stack would be a good fit:
/redo should only be available immediately after /undo or /rewind.
- Any new user prompt, edit, or state-changing command could clear the redo stack.
- If a full session-state restore is too expensive, even a best-effort redo for turn and file state would materially improve the UX.
Describe the feature or problem you'd like to solve
/undoand/rewindare documented, but there is no documented way to redo after rewinding too far. If a user accidentally undoes one turn too many, they have to recover by manually reconstructing state from session history, editor local history, git history, or by rerunning the original prompt.Proposed solution
Add a complementary
/redocommand that steps forward through the rewind stack created by/undoand/rewind, restoring the reverted turn and its file changes until a new action invalidates the redo stack. This would make rewind safer to use, reduce accidental loss of work, and align with common editor and terminal expectations.Example prompts or workflows
/undoto inspect the state before the last turn, realize it was one step too far, then run/redoto restore that turn./redo./undotwice, then recover without needing/resume, session history, or rerunning the original prompt./undoafter a broad code change, confirm the change was actually desired, then/redoto restore it intact.Additional context
A standard undo/redo stack would be a good fit:
/redoshould only be available immediately after/undoor/rewind.