OpenAI Codex release notes: 0.154.0 adds managed worktrees

OpenAI Codex release notes: 0.154.0 adds managed worktrees

OpenAI Codex CLI 0.154.0 can create separate checkouts for new or forked sessions. The feature is experimental and requires worktrees to be enabled. Codex CLI is OpenAI's terminal-based coding agent; a Git worktree is a separate working directory that shares the project's Git history.

OpenAI Codex release notes: separate checkouts in 0.154.0

The version was published on September 9. You can start a fresh session in a separate checkout or fork an existing conversation into one. Only a fork inherits conversation history. Codex loads the destination directory's configuration before work starts.

Support is limited to local sessions in Git repositories. Creating a checkout from inside Codex requires an idle primary session with no queued input. A fork can be refused if developer instructions differ between the directories.

Source: OpenAI Codex CLI 0.154.0 release notes.

Source: OpenAI: worktrees for interactive sessions and fresh sessions and forks.

Human step: start in a new checkout

For npm installations, OpenAI provides this update command:

npm install -g @openai/[email protected]

Source: OpenAI Codex changelog.

Then run this from your local Git repository. The flag enables the experiment for this invocation and starts the session in a new checkout:

codex --enable worktrees --worktree

Source: OpenAI: CLI flags in 0.154.0 and interactive worktree support.

In a local session with the feature enabled, /worktree opens options to create or fork a conversation. Choose Browse worktrees to search checkouts, resume an owner session, or copy a checkout's working directory.

Source: OpenAI: the /worktree command and Browse worktrees.

Short example: use the new Codex feature

After starting the new checkout:

Read the project instructions and README in this checkout. Clarify one unclear installation step using evidence from the project files. Change only the README and show the diff. State which working directory you used.
  • The response identifies the new checkout's path.
  • The diff contains only the intended README change.
  • The clarified step is supported by existing project files.

The Forge newsletter

Get new articles in your inbox

Pick the topics you care about. No noise, at most one email a week.

Get new articles in your inbox

We follow GDPR. Unsubscribe anytime.