feat(control): add /rewind slash command for session rollback#3164
Closed
yhemeo613 wants to merge 1 commit into
Closed
feat(control): add /rewind slash command for session rollback#3164yhemeo613 wants to merge 1 commit into
yhemeo613 wants to merge 1 commit into
Conversation
Adds parseRewind helper and wires /rewind into Controller.Submit() so all
frontends (TUI, desktop, HTTP) can trigger checkpoint-based rollback.
Usage:
/rewind → rewind to latest checkpoint (both)
/rewind <turn> → rewind to specific turn (both)
/rewind <turn> <scope> → rewind with explicit scope
scope = code | conversation | both
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
/rewindslash command support toController.Submit()so all frontends(TUI, desktop webview, HTTP/SSE server) can trigger checkpoint-based rollback
without relying solely on the Esc-Esc picker.
Usage
/rewind— rewind to latest checkpoint (both code + conversation)/rewind <turn>— rewind to a specific turn (both)/rewind <turn> <scope>— rewind with explicit scopescope=code|conversation|bothChanges
internal/control/controller.go: wire/rewindintoSubmit(), addparseRewind()helperinternal/control/controller_test.go: addTestParseRewind+TestParseRewindEmptyCheckpointsTest Plan
go test ./internal/control/...passesgo build ./cmd/reasonixsucceeds/rewindwithout args picks latest checkpoint/rewind <turn>defaults toRewindBoth/rewind <turn> <scope>respects explicit scope