Feature request: add chat:redo action (counterpart to chat:undo)
Status Closed — not planned
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 6 comments · opened Mar 1, 2026 · closed Apr 6, 2026
Feature request
chat:undo exists and works (bound to Ctrl+_ by default), but there is no chat:redo action. This means undo is a one-way operation — if you undo too far, there's no way to recover without retyping.
Use case
When writing prompts in iTerm2, it's easy to accidentally hit ⌘⌫ (delete line). With undo mapped via iTerm2's "Send Hex Code" (0x1f), you can recover. But if you undo one step too many, there's no redo to go forward again.
Expected behavior
A chat:redo action should exist alongside chat:undo, bindable via ~/.claude/keybindings.json. A sensible default might be Ctrl+X Ctrl+_ (matching Zsh's convention) or left unbound by default.
Current workaround
Use Ctrl+G to open an external editor for complex prompts, which has its own undo/redo. But this adds friction for quick edits.
Additional context
chat:undoworks but operates on inconsistent chunk sizes (sometimes single characters, sometimes word groups)- Sending a redo key sequence (e.g.
0x18 0x1f) results in literal control characters being inserted rather than triggering any action, confirming no redo handler exists - These literal control characters bypass the empty-message guard but are stripped before delivery to the model
6 Comments
Immediate workaround: Add backup automation to your
CLAUDE.mdWhile waiting for
chat:redo, protect yourself with automated backups. This is going to happen a lot with AI-assisted coding.Note: I am on Linux (Fedora 42, Bash). These examples work there. Portability to macOS/Windows is not assured.
Add this to your project's
CLAUDE.md:Full
scripts/backup.shexample:Session tracking file (optional but recommended):
Keep a
session_tracking.csvto track your work history:Add to CLAUDE.md:
This gives you a history of what was done and when, useful for recovering context after undo mishaps.
Pro tips:
``
bash
`cp -r backups/backup_XXXXXX backups/BASE_backup_XXXXXX
ls -dt backups/backup_*/ | tail -n +7`Modify cleanup to only rotate non-BASE:
Why this works:
CLAUDE.mdat session start and follows backup rulesThis does not solve the redo issue, but it prevents data loss until proper redo is implemented.
@Tanngrisnirr I'm not talking about rewind. How does backing up the project have anything to do with undo/redo in Claude Code's text field?
Begone AI slop.
+1. The undo infrastructure is already there, redo feels like an easy patch.
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
Y'all really need a better ticketing system. This needs reopening.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.