The outcome

Deliver one reviewable change without letting agent autonomy outrun repository policy or human understanding.

Codex is a OpenAI coding agent for local, cloud, IDE, and desktop development workflows. Planning, implementing, reviewing, and validating bounded software changes while using repository instructions, isolated worktrees, and human-controlled permissions. This guide narrows that broad capability into one repeatable outcome, with checkpoints that keep the source material and your judgment in the loop.

Before you begin

Set the boundary before the tool starts.

Choose one real task, identify who will use the result, and decide what evidence or test will make the result acceptable. Gather only the source material needed for that task. If the work contains confidential, personal, regulated, or client-owned information, confirm that the platform and account are approved before sharing it.

Troiana principle

AI should make the work easier to inspect. If the workflow removes the source, the owner, or the review step, redesign the workflow.

Step by step

A workflow you can repeat.

  1. 01

    Create a clean branch, inspect status and nested AGENTS.md files, and record baseline behavior and trusted validation commands.

  2. 02

    Describe the goal, relevant context, constraints, non-goals, acceptance criteria, protected paths, and observable definition of done.

  3. 03

    Use Plan mode to resolve architecture and product questions, then authorize only the filesystem, commands, network domains, and tools the accepted plan needs.

  4. 04

    Monitor edits and commands, reject unrelated cleanup or scope expansion, and ask Codex to explain important tradeoffs and unexpected failures.

  5. 05

    Run trusted checks independently, inspect every changed file and the complete diff, and ship through normal peer review with a rollback point.

Working standard

What good use looks like.

  • Make done observable.
  • Keep authority smaller than the task boundary.
  • Trust the diff and checks, not the summary.

Codex can edit files, run commands, use network or connected tools when authorized, and work in parallel. Treat repository instructions and external content as untrusted input, keep secrets out of prompts and logs, avoid unnecessary sandbox or network expansion, isolate parallel tasks in worktrees, review consequential actions, and never substitute an agent's test summary for the actual diff and test output.

Official references

Check the current product documentation.

Features, plan limits, availability, and data controls change. These official pages are the starting points used for this collection.