Working Notes on Agent Systems/Brad Zhang

@teach_fireworks / X longform

What is the use of Codex’s new fork command? To put it simply, it will open a new session based on one of

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...

May 21, 2026 · 2 min read

What is the use of Codex’s new fork command? To put it simply, it will open a new session based on one of
Figure 1 / source image

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.

Visual summary

Article argument map

Generated from the post's content graph

FORMATTOPICCAPABILITYMARKETcoverscoverssignalssignalsFORMATlongform noteTOPIClong running agentsTOPICmemoryCAPABILITYlong-running agentsMARKETopen-source builders
Mermaid outline
flowchart LR
  format-long_post["longform note"]
  topic-long-running-agents["long running agents"]
  topic-memory["memory"]
  capability-long-running-agents["long-running agents"]
  market-open-source-builders["open-source builders"]
  format-long_post -->|covers| topic-long-running-agents
  format-long_post -->|covers| topic-memory
  format-long_post -->|signals| capability-long-running-agents
  format-long_post -->|signals| market-open-source-builders

Visual structure

Essay structure map

Built from summary and key paragraph positions

What is the use of Codex’s new fork command? To put it simply, it will open a new ses...THESISWhat is the use ofCodex’s new forkcommand? To put itsimply, it will open aSIGNALWhat is the use ofCodex’s new forkcommand? To put itsimply, it will open aOPERATOR2. Resume is tocontinue writing alongthe same node.IMPLICATION4. The branches share"starting pointknowledge", butsubsequent reasoning
Mermaid outline
flowchart LR
  thesis["What is the use of Codex’s new fork command? To put it simply, it will open a new session based on one of y..."]
  signal["What is the use of Codex’s new fork command? To put it simply, it will open a new session based on one of y..."]
  operator["2. Resume is to continue writing along the same node."]
  implication["4. The branches share \"starting point knowledge\", but subsequent reasoning paths are independent and do not..."]
  thesis -->|frames| signal
  signal -->|develops| operator
  operator -->|lands in| implication

Source: View the original post