GPT WORLD / INDEPENDENT CODEX FIELD MANUAL Source review · 2026-10-21

Current edition / CODEX

Give each parallel attempt its own checkout and session

Codex CLI 0.163.0 separates where work happens from which session owns it: --worktree creates a managed Git worktree, codex exec fork copies a saved session into a new one, and codex queue sends a message to an existing session.

01 / DECIDE

Architecture decision

Use it when several attempts at one task must proceed without overwriting each other, or when a long run needs follow-up instructions without a restart.

Codex CLI 0.163.0 separates where work happens from which session owns it: --worktree creates a managed Git worktree, codex exec fork copies a saved session into a new one, and codex queue sends a message to an existing session. Map input, output, state, and side effects as one observable path before deciding which layer owns give each parallel attempt its own checkout and session.

02 / BUILD

Three-step implementation

  1. 01

    Frame the contract

    Write down the caller, data classification, success condition, timeout, cancellation, and ownership. Use it when several attempts at one task must proceed without overwriting each other, or when a long run needs follow-up instructions without a restart.

  2. 02

    Build one narrow path

    Implement one end-to-end path with request correlation, typed state, and reversible failure handling. Codex CLI 0.163.0 separates where work happens from which session owns it: --worktree creates a managed Git worktree, codex exec fork copies a saved session into a new one, and codex queue sends a message to an existing session.

  3. 03

    Prove the outcome

    Turn acceptance into a repeatable fixture, contract test, or browser test. Evidence is one worktree path and session identifier per attempt, every queued message landing on the intended thread, and a primary checkout that still holds no uncommitted agent edits.

03 / BOUND

Production boundary

The --worktree flag requires local execution and rejects resume, review, --ephemeral, and --ignore-user-config, while the app-server command behind the background server remains experimental and unsupported for production workloads.

04 / PROVE

Acceptance evidence

Evidence is one worktree path and session identifier per attempt, every queued message landing on the intended thread, and a primary checkout that still holds no uncommitted agent edits.

SOURCE / HTTP

Reproducible source probe

curl -fsSI 'https://learn.chatgpt.com/docs/developer-commands?surface=cli' | sed -n '1,5p'