Skip to content

Rewind to any user message #293

Open

Description

@hakula139

Goal

There is no way to undo a turn that went wrong. Let the user rewind the session to any earlier user message, restoring the conversation, the files, or both. Every user message is a checkpoint, including one sent while a turn runs (#291). Claude Code skips messages sent while it works, and Codex cannot roll back a message sent mid-turn.

Acceptance criteria

  • A named action (default Esc Esc on an empty input, like Claude Code) and /rewind open a picker that lists every user message in the active branch, each row showing the files changed after that message.
  • Choosing a message offers three restores: conversation only, files only (Snapshot files before each edit so changes can be restored #292), or both. A conversation restore puts the chosen message's text back into the input for editing.
  • Rewinding moves the session's head to the chosen message and keeps the abandoned messages in the session store. /resume and --continue follow the head, and older builds read the session unchanged, since a rewind changes no stored format.
  • The next request sends the history up to the chosen message, which is a prefix of earlier requests, so the prompt cache and preserved thinking stay valid.
  • Checkpoints before the latest compaction are listed but disabled, with a note that the compacted history can't be restored.
  • Rewind is refused while a turn runs.
  • The sessions guide documents rewind and what it cannot undo (bash changes, edits made outside oxide-code).
  • Tests cover a conversation-only rewind, a files-only rewind, both, a rewind to a message sent mid-turn, a resume after rewind, and the compaction boundary.

Notes

Depends on #291 and #292.

The conversation restore builds on #475, which adds the Checkpoint each recorded message returns, the title reset for a rewind to before the first prompt, and the TurnRolledBack event the TUI uses to hand prompts back. A checkpoint is valid only until the next compaction. With the SQLite session store from #729, message rows never change and a rewind moves the session's head pointer, so the abandoned branch stays available without a format bump.

Activity

  1. added this to the v0.1.0 milestone on Oct 17, 2026
  2. added
    enhancement
    area: session
    area: tui
    on Oct 17, 2026
  3. self-assigned this
    on Oct 17, 2026
  4. changed the title [-]Rewind to any message, steers included[/-] [+]Rewind to any user message[/+] on Oct 17, 2026
  5. hakula139 commented on Oct 28, 2026

    @hakula139
    MemberAuthor

    Scope change: with the SQLite session store from #729, a rewind moves the session's head over immutable message rows, so the criterion no longer bumps a session format. The description is updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: sessionarea: tuienhancement

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions