Tutorial

Start using Codex from the terminal

Tutorial · 2 min read

Terms in this guide: Acceptance criteria · Verification

The Codex CLI gives you a direct way to work with an agent from your terminal. The best first session is small: choose a repository you understand, ask for inspection before editing, and decide how you will verify the result.

Prepare a safe first task

Pick a change you could complete yourself in less than an hour. A documentation correction, a focused test, or a small UI fix gives you enough complexity to learn the loop without hiding risk.

  • State the outcome in one sentence.
  • Name the files or feature area that matter.
  • Tell Codex which checks should pass.
  • Ask it to explain uncertainty before changing code.

Open the project and establish context

Start the CLI inside the project directory. Ask Codex to inspect the relevant files and summarize its plan. Read that plan as a scope check: it should match the task, repository conventions, and the evidence available.

$ cd path/to/project
$ codex

> Inspect this repository and explain the smallest change that will fix [problem].
> Do not edit files until you have shown the plan and named the checks you will run.

Close the loop with evidence

A changed file is not the finish line. Review the diff, run the focused checks, and inspect the behavior that prompted the task. If a check cannot run, record why and decide whether the remaining uncertainty is acceptable.

  • Review the diff for unrelated edits.
  • Run the narrowest meaningful test first.
  • Check formatting or lint rules used by the project.
  • Summarize the result and any unresolved risk.

Official references

Continue with a practical next step

My learningReport an issue with this pageGet the next practical briefing

Progress stays in this browser. No account needed.

View saved items
Updates and upgrade guidance
  1. Learning context added

    Added prerequisites, a suggested practice estimate, expected output, and connected definitions. The article procedure was not independently re-evaluated in this change.

    What to do: Use the opening checklist to prepare. No software update is required for this editorial change.

This log starts with the first recorded review; it is not a reconstruction of earlier revisions.

Keep the momentum

Your next useful read.

Explore the learning library