You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow branch off from a past conversation in the current session #4690
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.
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.
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.
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.
Activity
github-actions commentedon Oct 3, 2025
Potential duplicates detected:
Powered by Codex Action
markgrover commentedon Oct 3, 2025
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.
matthew-plusprogramming commentedon Oct 6, 2025
+1 I would love this
gerrywastaken commentedon Oct 20, 2025
It is weird that we have this in the UI but not in codex where more people would know how to use it.
kargarisaac commentedon Oct 21, 2025
+1
matthew-plusprogramming commentedon Oct 22, 2025
I'm potentially interested in implementing this if no one Is currently looking into it
zats commentedon Dec 30, 2025
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
embedding-shapes commentedon Dec 30, 2025
I'd love this too! Even a
/branchcommand that branches from the current place into a new session, so we could fire up a new tab, then do/resumeand finally/branchand 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.deksden commentedon Jan 6, 2026
Session braches / forks should be implemented both as slash commands and CLI commands/options.
its must-have feature!
w-winter commentedon Jan 10, 2026
+1
hannasm commentedon Jan 10, 2026
+1
I ran into an old pull request #6993 that seems to have gone silent while looking around
etraut-openai commentedon Jan 14, 2026
The CLI now supports the
/forkslash command.colinsmetz commentedon Jan 15, 2026
Is there any plan to implement this also for non-interactive sessions? Something like
codex exec forketraut-openai commentedon Jan 15, 2026
@colinsmetz, if you'd like to see that, please open a new feature request. We generally prioritize features based on upvotes.
embedding-shapes commentedon Jan 26, 2026
@etraut-openai
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.
etraut-openai commentedon Jan 26, 2026
@embedding-shapes, if you'd like to suggest a change to the UX, please open a new feature request.