Summary
Add a first-class "rewind" affordance to jump back to a prior user message in the current session and re-prompt from there, discarding everything after. Equivalent to Claude Code's double-Esc behavior.
Motivation
When a turn goes off the rails (bad tool call cascade, misunderstood intent, polluted context), the user's options today are:
/new — nukes the whole session, loses durable context
/branch — forks into a new session (good for exploration, not for "undo")
- Manually tell the agent "ignore that, instead..." — context is still polluted, model has already committed to a direction, wastes tokens
There's no clean "back up two turns and try again" primitive. This is the single biggest UX gap relative to Claude Code for users coming from that tool.
Proposed UX
/rewind (and a keybind, e.g. double-Esc in CLI / TUI) opens a picker showing the last N user messages
- User selects a target message; transcript is truncated to just before that message; cursor lands in the input prompt pre-filled with the selected message text (editable)
- Submitting replays from that point — all messages, tool calls, and assistant turns after the rewind point are dropped from the active context
- Rewind point is a soft delete in the SQLite session store (recoverable / inspectable), not a hard truncate, so
session_search and audit can still see what was rewound
Scope
Related
/branch is a sibling primitive (fork into new session) but doesn't solve the in-place undo case.
Acceptance
Summary
Add a first-class "rewind" affordance to jump back to a prior user message in the current session and re-prompt from there, discarding everything after. Equivalent to Claude Code's double-
Escbehavior.Motivation
When a turn goes off the rails (bad tool call cascade, misunderstood intent, polluted context), the user's options today are:
/new— nukes the whole session, loses durable context/branch— forks into a new session (good for exploration, not for "undo")There's no clean "back up two turns and try again" primitive. This is the single biggest UX gap relative to Claude Code for users coming from that tool.
Proposed UX
/rewind(and a keybind, e.g. double-Escin CLI / TUI) opens a picker showing the last N user messagessession_searchand audit can still see what was rewoundScope
Related
/branchreliability bug/branchsessions disappearing/branchis a sibling primitive (fork into new session) but doesn't solve the in-place undo case.Acceptance
/rewindcommand + double-Esc keybind in CLI and TUI