[FEATURE] Undo Last Action
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
When working with Claude Code, sometimes a request results in unintended changes across multiple files.
Currently, the only way to revert is through manual git commands (git checkout, git stash, etc.), which can be error-prone and frustrating - especially when trying to undo changes from multiple requests or when the scope of what to revert is unclear.
Problem:
After a request makes unwanted changes, there's no simple way to undo
Manual git reverts require knowing exactly which files were modified
Multiple back-and-forth "undo" requests to Claude can cause confusion and further mistakes
Users may lose track of the original state they wanted to return to
Proposed Solution
Proposed Solution: Add an "Undo" button or /undo command that:
Reverts all file changes made by the last Claude action
Optionally, allows undoing multiple previous actions (undo stack)
Shows a preview of what will be reverted before confirming
Alternative Solutions
Additional Context:
Similar to how chat interfaces like ChatGPT have edit/regenerate, Claude Code could benefit from action-level undo
This would make iterative development safer and reduce anxiety about making experimental requests
Priority
Critical - Blocking my work
Feature Category
CLI commands and flags
Use Case Example
_No response_
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗