[FEATURE]: Fork/Copy sessions with full context #3033

Closed
opened 2026-02-16 17:38:19 -05:00 by yindo · 3 comments
Owner

Originally created by @MSoares98 on GitHub (Nov 21, 2025).

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem:
When working on a large session with significant accumulated context (file reads, code understanding, conversation history), I sometimes want to explore a tangent or ask a clarifying question without cluttering the main session.

Currently, my options are (afaik):

  • Stay in the session: Ask the question, but this adds noise to the conversation and may derail the main task
  • Start a new session (/new): Lose all accumulated context and have to rebuild it

Proposed Solution:
Add a /branch or /fork command that:

  1. Creates a new session that is an exact copy of the current session (all messages, tool results, file references, etc.)
  2. Switches to that new session
  3. Leaves the original session untouched
    This would allow:
  • Exploring "what if" scenarios without affecting the main workflow
  • Asking clarifying questions in isolation
  • Testing different approaches from the same starting point
Originally created by @MSoares98 on GitHub (Nov 21, 2025). ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request Problem: When working on a large session with significant accumulated context (file reads, code understanding, conversation history), I sometimes want to explore a tangent or ask a clarifying question without cluttering the main session. Currently, my options are (afaik): - Stay in the session: Ask the question, but this adds noise to the conversation and may derail the main task - Start a new session (/new): Lose all accumulated context and have to rebuild it Proposed Solution: Add a /branch or /fork command that: 1. Creates a new session that is an exact copy of the current session (all messages, tool results, file references, etc.) 2. Switches to that new session 3. Leaves the original session untouched This would allow: - Exploring "what if" scenarios without affecting the main workflow - Asking clarifying questions in isolation - Testing different approaches from the same starting point
yindo added the discussion label 2026-02-16 17:38:19 -05:00
yindo closed this issue 2026-02-16 17:38:19 -05:00
Author
Owner

@MSoares98 commented on GitHub (Nov 21, 2025):

This already exists.
Sorry

@MSoares98 commented on GitHub (Nov 21, 2025): This already exists. Sorry
Author
Owner

@llitz commented on GitHub (Jan 24, 2026):

This already exists. Sorry

@MSoares98 , I don't mean to necro this, and I might be wrong, on my workflow, but how can I fork from the current message?

I literally would like to dup the session so I can go an entire different message from my message, either to issue a /compress in a different session or just explore a different path without losing the last update

As of now, I just send a simple chat with a single word, quickly press escape, then fork from the previous - and undo the x later on when I come back

@llitz commented on GitHub (Jan 24, 2026): > This already exists. Sorry @MSoares98 , I don't mean to necro this, and I might be wrong, on my workflow, but how can I fork from the current message? I literally would like to dup the session so I can go an entire different message from my message, either to issue a /compress in a different session or just explore a different path without losing the last update As of now, I just send a simple chat with a single word, quickly press escape, then fork from the previous - and undo the x later on when I come back
Author
Owner

@MSoares98 commented on GitHub (Jan 25, 2026):

This already exists. Sorry

@MSoares98 , I don't mean to necro this, and I might be wrong, on my workflow, but how can I fork from the current message?

If I'm not mistaken, you can just right click (I don't know the keyboard shortcut) the message you want to fork from and there is an option to do it. It will create a duplicate session with all the context up to that message.

Hope that's what you needed.

@MSoares98 commented on GitHub (Jan 25, 2026): > > This already exists. Sorry > > @MSoares98 , I don't mean to necro this, and I might be wrong, on my workflow, but how can I fork from the current message? > If I'm not mistaken, you can just right click (I don't know the keyboard shortcut) the message you want to fork from and there is an option to do it. It will create a duplicate session with all the context up to that message. Hope that's what you needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3033