docs(rfd): Session Rewind — truncate and edit history (v2)#1321
Open
htahaozlu wants to merge 1 commit into
Open
docs(rfd): Session Rewind — truncate and edit history (v2)#1321htahaozlu wants to merge 1 commit into
htahaozlu wants to merge 1 commit into
Conversation
This was referenced May 31, 2026
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.
Drafts the "Truncate/Edit support" item listed under "RFDs to be Written" in the v2 overview.
Summary
Two methods for in-place modification of a session's conversation timeline:
session/rewind { sessionId, toMessageId }— truncate history at a message; the next prompt continues from there.session/edit_prompt { sessionId, messageId, content }— rewind to a user message, replace its content, re-run from that point.One capability (
agentCapabilities.session.rewind), one new notification (history_truncated) for the destructive event — the symmetric counterpart to the v2 prompt lifecycle's additiveuser_message.edit_prompt's accept/echo/state_changeflow reuses the v2 prompt lifecycle wholesale.Relation to existing work
session/loadreplay. v2 settles exactly those questions, so the proposal re-bases onto v2 rather than iterating docs(rfd): Session Rewind #1214 in place.session/inject) — inject is additive ("add this"), rewind is destructive ("undo that"). Shared substrate, non-colliding capabilities/flags, and they compose.messageId,user_messageecho,state_change.session/undo/redo).Out of scope
Filesystem rollback (left to
fs/*,session/fork, IDE history, or SCM), conversation branching, and per-edit model/MCP/tool overrides — each noted as future work in the RFD.This PR adds the RFD file only; happy to add the
docs/docs.jsonv2 nav entry (rfds/v2/session-rewind) on request — left out to keep the diff a single clean new file.