跳到正文
原文
DEV Community · Codex· Yong Yu·· 23小时前AI 评分62

Codex CLI 大更新解读:首次会话清单、并行 Agent 与 /fork 为何不是 worktree

原文标题:Codex CLI's Big Refresh Just Landed: First Session, Parallel Agents, and Why /fork Isn't a Worktree

AI 导读

OpenAI 在 9 月 22 日至 10 月 1 日间连续发布 Codex CLI 0.156.0 到 0.160.0,官方称之为一次大更新,带来全屏终端界面、/agents 视图和并行任务管理。

正文

当前语言的正文正在等待翻译,暂时显示原文。

Attributed compile (not original research)

Primary source: ChatGPT & Codex changelog by OpenAI, Codex CLI releases 0.156.0 (2026-09-22) through 0.160.0 (2026-10-01), plus OpenAI's Codex CLI command reference

Announcement context: OpenAI Developers announced the "major refresh" on 2026-09-29; the text was reposted in Major Codex CLI refresh, with a new look and powerful new capabilities (OpenAI Developer Community, 2026-09-30)

Secondary coverage: OpenAI Refreshes Codex CLI with Full-Screen UI and Parallel Task Management by Hiren Dave (TheNextGenTechInsider, 2026-10-04); Codex CLI Update: Voice, the /agents View, Resume and Worktrees by Rogier Muller (Codex Workshop, 2026-09-29)

This post restates OpenAI's release notes and docs in my own words, with a first-session checklist. I did not run the new Codex CLI build for this article. Feature descriptions are vendor-reported or attributed to the named secondary source. Shell snippets are adapted patterns using documented commands, not output from a real session.


OpenAI is calling it a "major refresh" of Codex CLI. The announcement pitches three things: a full-screen terminal interface, better readability, and "ways to manage parallel work" without leaving the terminal. Under the hood it is not one release. It is a run of builds, 0.156.0 through 0.160.0, shipped between September 22 and October 1.

That matters for a practical reason. Which version you have decides what you actually see. And one headline phrase, "/fork into a worktree," is easy to misread in a way that can cost you a messy checkout.

What actually changed (by release)

Here is the changelog, grouped by what you will notice:

Release Date What changed (vendor-reported)
0.156.0 Sep 22 Optional full-screen UI via /tui (transcript search, mouse selection, right-click copy); voice on by default (F8); /usage analytics dashboard; worktree sessions from the agent command center, with worktree support on by default; Mermaid diagrams and equations rendered in the terminal; --no-daemon
0.157.0 Sep 25 Full-screen transcript on by default; automatic background-server startup for eligible sessions; GPT-6 Sol and Luna in the catalog
0.159.0 Sep 29 Opt-in instant_interrupt so new input can steer mid-response; compact welcome screen; .aws directories protected by default under writable roots
0.159.1 Sep 29 GPT-6.1 Sol becomes the default in the bundled catalog
0.160.0 Oct 1 "Show more" history in the agent command center; projectless sessions (when policy permits); unsent queued messages resume after a reconnect without being sent twice

The community repost of the announcement points to two quality-of-life fixes. Older history now loads as you scroll, past your terminal's own scrollback limit. And the composer stays pinned at the bottom, so you no longer scroll back down to type during a long session. One commenter in the thread called the old behaviour a bug.

The mental model: the TUI is now a control plane

Before this refresh, Codex CLI was basically a chat loop in your terminal. Now it is closer to a supervisor for several agent threads:

  • The agent command center (OpenAI's announcement calls it the /agents view) lists your sessions. You can filter them by status and start worktree sessions from there.
  • Subagent threads are things you switch into with /agent or /subagents, per the current command reference. Codex Workshop notes that the announcement and the docs use different names here, so type / and check what your build actually offers.
  • Steering vs queueing. Press Enter while Codex is working to inject instructions into the current turn. Press Tab to queue a follow-up for the next turn. Press Escape twice with an empty composer to edit your last message and fork the chat from that point.

The trap: /fork is a chat fork, not automatically a checkout

As relayed in press coverage, the announcement says you can "/fork a conversation into a worktree with the same context and a separate checkout." That sounds like /fork always gives you filesystem isolation.

OpenAI's own command reference describes /fork more narrowly. It clones the current chat into a new chat with a fresh ID and leaves the original transcript alone. The thing that creates a separate checkout is a worktree session. Per the 0.156.0 notes, you start one from the agent command center, and worktree support is on by default.

If you fork a chat and both threads keep writing to the same directory, you have two agents editing one working tree. The isolation you assumed isn't there. So check before you let a second agent write anything:

# Adapted pattern: confirm isolation before parallel edits
git worktree list            # the second session should have its own path
# inside each Codex session:
#   /status  -> check writable roots point at the path you expect

Codex Workshop, citing OpenAI's worktree guide, adds two caveats. Managed worktrees sit under $CODEX_HOME/worktrees on a detached HEAD. And ignored files such as .env are not copied into them automatically. Git's usual rule also still applies: a branch can be checked out in only one worktree at a time.

First session checklist

  1. Upgrade. Run npm install -g @openai/codex@latest, or pin @openai/[email protected] if you want the October 1 build exactly. codex update works when your installed release supports self-update.
  2. Health check. Run codex doctor --summary to check install, config, auth, Git, and terminal.
  3. Start with sane permissions. The docs suggest codex --sandbox workspace-write --ask-for-approval on-request for low-friction local work. Avoid --yolo outside an isolated VM.
  4. Confirm the session. Run /status to see the active model, approval policy, writable roots, and context usage. If GPT-6.1 Sol isn't what you expected, switch with /model.
  5. Parallelize deliberately. Start the second task as a worktree session, then verify with git worktree list. Codex Workshop also warns that approval prompts can come from a thread you aren't looking at, so read which thread is asking before you approve.
  6. Cap concurrency. Codex Workshop documents a per-project limit you can set:
   # .codex/config.toml (pattern from Codex Workshop's restatement of the docs)
   [agents]
   max_concurrent_threads_per_session = 4
  1. Watch the bill. Subagents each do their own model and tool work, so parallel sessions use more tokens. Use /usage (added in 0.156.0) to see token activity.
  2. End each thread with a review. Run /diff, then /review, before you merge anything a parallel thread produced.
  3. Escape hatch. If the full-screen UI fights your tmux or SSH setup, /tui picks the UI mode for your next launch, and --no-alt-screen turns off alternate-screen mode for a single run.

Why this matters

Terminal coding agents are turning into orchestrators. The full-screen UI is the visible part. The real change is that one terminal now supervises several threads, each with its own context, permissions, and maybe its own checkout. That makes "which directory is this agent writing to?" a question you have to answer on purpose. Before you run two agents at once, check git worktree list and look at the writable roots in /status.


Byline: YongBo Yu — Toronto AI engineer (agents, LLM workflows). GitHub: YongBoYu1.

来源:DEV Community · Codex · dev.to