Skip to content

Allow branch off from a past conversation in the current session #4690

Closed

Description

@markgrover

What feature would you like to see?

I was in a codex session, created a plan for an issue. Then as I started diving further on the plan (still conversation, no code was written), realized that such a path wouldn't work. So I want to go back to the 3rd message in the conversation and branch off from there, clearing all the context from that message forward. The scope of my request is limited to when no code was modified.

I haven't thought about the implications if code was modified, since that's not the motivation for logging this issue. In such a case, it's possible that the right solution here would be to revert the code and reset the context? Or to revert the code, but not reset the context.

Are you interested in implementing this feature?

No

Additional information

No response

Activity

  1. markgrover commented on Oct 3, 2025

    @markgrover
    Author

    I reviewed these and none of these are duplicates. The closest is #4487 but that talks about code checkpointing and undoing. To that extent, that issue covers reseting context, this issue is a subset of that issue. If not, then this issue still stands.

  2. matthew-plusprogramming commented on Oct 6, 2025

    @matthew-plusprogramming

    +1 I would love this

  3. gerrywastaken commented on Oct 20, 2025

    @gerrywastaken

    It is weird that we have this in the UI but not in codex where more people would know how to use it.

  4. kargarisaac commented on Oct 21, 2025

    @kargarisaac

    +1

  5. matthew-plusprogramming commented on Oct 22, 2025

    @matthew-plusprogramming

    I'm potentially interested in implementing this if no one Is currently looking into it

  6. marked Forking sessions #4514 as a duplicate of this issue on Nov 12, 2025
  7. zats commented on Dec 30, 2025

    @zats

    I put together a working prototype in my fork https://github.com/zats/codex/tree/fork-session
    Sadly video upload is currently failing in GitHub but here is the demo https://x.com/zats/status/2005796966920511791

  8. embedding-shapes commented on Dec 30, 2025

    @embedding-shapes

    I'd love this too! Even a /branch command that branches from the current place into a new session, so we could fire up a new tab, then do /resume and finally /branch and now it's considered a new conversation, would be a good enough MVP to have at least some way of continuing in two different ways.

  9. deksden commented on Jan 6, 2026

    @deksden

    Session braches / forks should be implemented both as slash commands and CLI commands/options.

    its must-have feature!

  10. w-winter commented on Jan 10, 2026

    @w-winter

    +1

  11. hannasm commented on Jan 10, 2026

    @hannasm

    +1

    I ran into an old pull request #6993 that seems to have gone silent while looking around

  12. etraut-openai commented on Jan 14, 2026

    @etraut-openai
    Contributor

    The CLI now supports the /fork slash command.

  13. colinsmetz commented on Jan 15, 2026

    @colinsmetz

    Is there any plan to implement this also for non-interactive sessions? Something like codex exec fork

  14. etraut-openai commented on Jan 15, 2026

    @etraut-openai
    Contributor

    @colinsmetz, if you'd like to see that, please open a new feature request. We generally prioritize features based on upvotes.

  15. embedding-shapes commented on Jan 26, 2026

    @embedding-shapes

    @etraut-openai

    The CLI now supports the /fork slash command.

    I've played around with this now, but the UX is kind of unexpected and non-intuitive. Together with that the list of chats not showing enough context for us to know what chats are what, it ends up being really hard to use /fork.

    The way it works today, is that you're expected to open a new session, type /fork, then find the conversation you want to fork, and select that. Then you know have two sessions open. If you select the wrong one, you now have another session added you have no use of.

    The way I expected it to work, like in git, is that you are currently at one spot, then you "fork" from the active spot, into a new one. So instead of "Start new session, find what you wanna fork, select that", you'd just enter /fork in your existing session, and that's it, now you're forked. No need to select anything, no risk of forking the wrong session, and would fit with the overall UX much better.

    This might not be the best place for it, happy to be redirected to a better place for the feedback.

  16. etraut-openai commented on Jan 26, 2026

    @etraut-openai
    Contributor

    @embedding-shapes, if you'd like to suggest a change to the UX, please open a new feature request.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions