Cmd. /fork
Branch the current conversation into a new thread.
Key takeaways
/forkclones the current conversation into a new thread with a fresh ID while preserving the original transcript.- Use it before trying an alternate implementation path or running parallel design explorations.
- Use
codex forkfrom the shell when you need to fork a saved session rather than the current one. - Forked work still needs review, diff inspection, and tests; name or title related sessions so you can find them later.
Original Command Declaration
/forkOfficial Summary
/fork clones the current conversation into a new thread with a fresh ID, preserving the original
transcript.
Usage
/forkGood Examples
- Fork before trying an alternate implementation path.
- Use
codex forkfrom the shell when you need to fork a saved session rather than the current one.
Similar Commands
| Command | Difference | Choose It When |
|---|---|---|
/fork | Creates a new branch of the conversation | You need a longer alternate path |
/side | Opens a short ephemeral detour | You need a focused question |
/resume | Reopens saved history | You need to continue previous work |
Use Cases
- Trying risky alternatives without losing the main plan.
- Running parallel design explorations.
- Preserving a known-good transcript before a major change.
Recent Changes
- Remote resume/fork history restoration has been improved.
- App-server thread handling and pagination make large thread lists easier to work with.
Cautions
- Forked work still needs review, diff inspection, and tests.
- Name or title related sessions so you can identify them later.
Release Basis
- Judgment: first observed mention
- First evidence version:
rust-v0.88.0 - Date (UTC): 2026-01-21
- Release link: https://github.com/openai/codex/releases/tag/rust-v0.88.0
Sources
- Codex slash commands: https://developers.openai.com/codex/cli/slash-commands
- Codex CLI features: https://developers.openai.com/codex/cli/features