Make it easy to fork *current session* and go back to where you forked
Resolved 💬 6 comments Opened Jan 19, 2026 by markgrover Closed Jan 24, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What feature would you like to see?
I had originally filed https://github.com/openai/codex/issues/4690
It seems like /fork now exists but I find it to be rather lacking and it doesn't meet the stated use cases of 4690 easily.
2 issues:
- Currently, when I fork, I have to specify which session I want to fork. But really, every single time, I have wanted to fork the thread I am on. So, now I have to find which session to fork - from a list which just has 3 columns
Updated,BranchandConversation. Most of my conversations start with a same prompt so I can't tell which session I have to fork. There are many ways to make this choice simpler (including putting a badge/star on my current session, listing session IDs, or making forking from current session a top level choice).
- I fork because I want to go down a tangent. Sometimes the tangent is productive and sometimes it's not. So, I want to go back to the part where I forked off from. For this to be accomplished today, I have to go find the session ID of the original session from where I forked and resume from there. However, same problem in resume, I have so many sessions, there's not even a session ID displayed in the resume list, so it takes a long time to find the unforked session. All this is still predicated on me noting down the session ID before I fork, which I don't always do. There's gotta be a better way to make this happen.
Additional information
_No response_
6 Comments
Thanks for the feature request.
Follow-up question... when you "go back to the part where [you] forked off from", what do you do with code modifications that were made on that forked conversation? Do you revert them? Commit them? Or do these explorations typically involve no code modifications (planning, discovery, etc.)?
You mentioned that most of your sessions start with the same prompt. If you're able to say more, I'm curious to understand more about this. This is quite different from how I (and probably most) users use Codex. If your prompt is often the same, do you use a custom prompt to avoid typing it every time?
Just trying to get a better sense for your workflow.
Thanks for taking the time to read and ask!
RE: code modifications:
RE: sessions starting with the same prompt:
Like everyone else, my sessions start with a plan. However, I find the plan capabilities lacking. I saw your message about
/planin another thread and tried it. It still didn't cut it - I am not sure if I can articulate it super well, but I find that either the plan output is too high level (audit current code to figure out all usages of X), or too low level (here are the usages of X I found in all these files) and neither of them are good for me to engage with. The only thing, I found that makes planning work well with codex is Superpowers. So all my sessions start with running~/.codex/superpowers/.codex/superpowers-codex bootstrap. I left a note about my experience using superpowers in this threadJust saw
/forkfork the current session and LOVE IT!Additionally,
/statusshows:│ Forked from: 019bee2a-2602-7502-95cb-66508dbf2f26So that solves my problem of going back to the original session. Thanks for turning this around quickly!
I'm confused- how does
/forkdiffer from or relate to the esc esc functionality? This needs to be documented much better in terms of exactly how this affects the transcripts (when does the command clone a new session conversation), and also what is in the context window after running the command. It gets quite confusing especially when you resume a conversation- I get the feeling that what's in the context window is not what I see in the transcript.Actually, I see now that the esc esc forking functionality seems to have been removed here:
https://github.com/openai/codex/pull/9140
That's fine I suppose- one just has to remember to fork before using this if you wish to retain the original conversation. However, while things are fine while working in the "rolled back" conversation, it's quite confusing when resuming as all the original "rolled back" messages come back. In other words, when resuming a "rolled back" conversation that used double
esc, what's in the transcript does not match the context window (as I mentioned above).Can we get a
/fork <Set>?i want to Fork Chatsession cut below -> as usual
i want to Fork Chat cut above -> forgets old Chat
i wants cut any of it -> forgets something in between
This is for when i really care about the Projekt,
Thanks