Codex CLI Adds Experimental Worktree Support for Isolated Sessions

CodexView original changelog

Codex CLI 0.154.0 introduced experimental worktree support, letting developers create isolated git checkouts for new or forked sessions with a --worktree flag or a /worktree command, then browse and resume those worktrees later. The feature targets the common pattern of running several Codex sessions against the same repository at once without them overwriting each other's files, and it arrives in the same release that brought GPT-6 Astra into the model picker.

Key Takeaways

  • Codex CLI 0.154.0 added experimental worktree support, creating isolated git checkouts for new or forked sessions.
  • Developers can invoke it with the --worktree flag at launch or the /worktree command from inside a running session.
  • Codex tracks the worktrees it creates, so they can be browsed and resumed later rather than being untracked scratch directories.
  • The feature specifically covers forked sessions, making it practical to explore two approaches at once without file collisions.
  • The experimental label signals the command surface may still change before it stabilizes.
  • The same 0.154.0 release also brought GPT-6 Astra into the model picker and Amazon Bedrock catalogs.

Sources & Mentions

1 external resource covering this update


Isolated Checkouts for Parallel Sessions

Developers who run more than one agent session against a single repository have long faced the same problem: two sessions editing the same working tree will step on each other. Git worktrees are the standard answer, and with Codex CLI 0.154.0, released September 9, 2026, OpenAI built support for them directly into Codex.

The feature is marked experimental. A developer can attach a worktree to a new or forked session with the --worktree flag at launch, or reach for the /worktree command from inside a running session. Codex creates the isolated checkout, runs the session against it, and keeps track of it afterward so the worktree can be browsed and resumed rather than being a one-off scratch directory that has to be found and cleaned up by hand.

Why Forked Sessions Matter Here

The explicit mention of forked sessions is the interesting part. Forking a session to try a second approach is only genuinely useful if the two branches of work do not collide on disk, so pairing forks with worktrees closes a gap that made forking less practical than it sounds. A developer can now take a session that has gone partway down one path, fork it, and let the fork work in its own checkout while the original continues untouched.

An Increasingly Common Pattern

Codex is not alone in reaching this conclusion. Worktree management has been showing up across agentic coding tools as parallel sessions become a normal way to work rather than an edge case, which suggests the underlying need is real rather than speculative. Shipping it behind an experimental label gives OpenAI room to change the command surface before it settles.


Mentioned onOpenAI