Skip to content

Feature request: Add /rewind command to roll back conversation to a specific point #29980

@yapxue

Description

@yapxue

Problem

During long coding sessions, the conversation may go in a wrong direction. Currently /undo reverts file changes, but the full conversation history (including the wrong direction) remains in context. This wastes context window space and can mislead the agent in subsequent responses.

Proposed Solution

Add a /rewind command that allows the user to roll back the conversation history to a specific point (similar to Claude Code's rewind feature).

Expected behavior

  1. Running /rewind shows a list of conversation checkpoints (e.g., each user message or tool invocation)
  2. The user selects a checkpoint to rewind to
  3. All conversation history after that checkpoint is removed from the context
  4. File changes made after that checkpoint are reverted
  5. The user can then continue the conversation from that point with a corrected prompt

Benefits

  • Reduces context usage — removes unnecessary conversation history from a wrong direction
  • Avoids misleading context — the agent won't be influenced by prior incorrect attempts
  • Better than /undo/undo only reverts the last change and keeps the full conversation in context; /rewind truncates conversation history entirely

Alternatives Considered

  • /undo — reverts file changes but keeps conversation history, doesn't reduce context size
  • /compact — summarizes conversation but still retains information from wrong directions
  • Starting a new session — loses all useful context from before the wrong turn

Additional Context

This is available in Claude Code as the "rewind" feature and is very useful for long exploratory sessions where the agent may take a wrong approach.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions