GPT WORLD / INDEPENDENT CODEX FIELD MANUAL Source review · 2026-07-26

Field guide / 12 min

Run the first repository session like an engineer

Working directory and definition of done shape the result more than prompt theatrics.

Track
Codex CLI core
Level
Foundation
Maturity
Stable

The first useful Codex session begins in the right repository with a bounded permission mode and a prompt that states goal, context, constraints, and done condition. Codex can explore, edit, run checks, and report evidence, but only when the task boundary is explicit.

CLI

Verified terminal sequence

TERMINAL / COPY WITH INTENT
  1. $codex
  2. $codex -C path/to/repo
  3. $codex --sandbox workspace-write --ask-for-approval on-request
A

Working principles

01

Directory is context

Launch inside the intended repository or set it with -C. Repository guidance and project configuration are discovered from that root.

02

Prompt the contract

State the goal, relevant files or errors, boundaries, and observable completion criteria.

03

Ask for evidence

A confident summary is not verification. Require the checks run, their result, and any remaining uncertainty.

B

Field procedure

  1. 01

    Choose a reversible task

    Begin with a small documentation, test, or focused bug task whose expected result is easy to inspect.

  2. 02

    Launch in the correct root

    Use codex in the repository, or codex -C when your shell is elsewhere.

  3. 03

    Write the task contract

    Name goal, context, constraints, and done condition in plain language.

  4. 04

    Let Codex inspect before editing

    Ask it to locate the real execution path and state its intended validation before making changes.

  5. 05

    Review the evidence

    Inspect changed files, tests, and unresolved risks before accepting the result.

PASS / FAIL

Acceptance checklist

  • The session workspace is the intended repository.
  • The prompt states what must remain unchanged.
  • Done means observable checks, not prose.
  • You inspect the resulting diff.

WATCH / REJECT

Failure patterns

  • Launching one directory above several unrelated repositories.
  • Listing micro-steps while omitting the desired outcome.
  • Accepting a completion claim without checks.