Skip to content

Conversation

@krissetto
Copy link
Contributor

Allows users to edit a previous message, which will cause the session to branch off on the spot so no messages in the original session get lost

The newly created session gets a parent session id and position of the message it was branched off from, allowing for future features that may be interesting to have (tracing a session tree, branching off a question to multiple different models/agents at the same time, etc.)

Screencast

Screencast.From.2026-02-03.13-45-44.mp4

Allows users to edit a previous message, which will cause the session to branch off so no messages in the original session get lost

Signed-off-by: Christopher Petito <chrisjpetito@gmail.com>
Signed-off-by: Christopher Petito <chrisjpetito@gmail.com>
@krissetto krissetto requested a review from a team as a code owner February 3, 2026 12:52
@krissetto krissetto self-assigned this Feb 3, 2026
Copy link
Contributor

@vvoland vvoland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works!

@krissetto
Copy link
Contributor Author

@vvoland what do you think about the UX? any hard desire for the session not to branch? i think this is safer as a default. Or any other thoughts? :)

@vvoland
Copy link
Contributor

vvoland commented Feb 4, 2026

UX-wise, there are issues imo:

  • The edit button is hard to spot (I wouldn't know about this feature without your demo video)
  • Having to use mouse - would be nice to have a keyboard shortcut to jump to the previous/next message and then hit a key to edit the message.

As for branching itself - no hard opinion, but personally I'm fine with just discarding the conversation after the edited message. I don't think I would have the brain capacity to think about different branches 😅

@krissetto
Copy link
Contributor Author

For the edit button, i was thinking we could reuse the message selection code that already exists when pressing TAB, which now only selects assistant messages for copying them but could easily extend to user messages where then pressing e could start the editing.. will TAL at that

Totally agree the button can be hard to spot, its not easy to make things both visible and not too ugly in a terminal interface (and font choice also affects what you see)

Branching was more something i wanted to have because:

  • 1 we don't lose history.
  • 2 many times in different editors i wanted to see and/or compare results after changing 1 message in a conversation, or maybe asking a different model, etc
  • 3 allows for other neat features where you can e.g. branch to 2-3 agents and then converge. potentially, maybe 😂

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants