What is the use of Codex’s new fork command? To put it simply, it will open a new session based on one of your sessions as the base and inherit the existing context. This is a very useful feature. For example, if you have compiled a lot of information and accumulated hundreds of rounds of discussions, you may have several options for a certain scenario. The general approach is to pick one by yourself, or let Codex give you a suggestion. It is impossible to execute them one by one. Fork comes in handy! - codex fork --last: Pull branches directly from the latest session - codex fork <session_id> "Rework a version with performance priority": open a new line with goals - The main line is always clean, and the experiment is always controllable. What is really solved is the most expensive problem in the project: low-cost parallel trial and error without polluting the main line. From a technical perspective, a Codex session can be understood as a "context tree (DAG perspective)":
- Each conversation has a historical context (what you said, what the model gave, and what actions were recommended).
- Resume is to continue writing along the same node.
- Fork is to copy the context snapshot from a historical node and grow a new branch.
- The branches share "starting point knowledge", but subsequent reasoning paths are independent and do not cover each other.
