Module 03.1

Codex get started

Run your first Codex task
without teaching yourself bad habits.

Start here if you are new to Codex or if your first attempts felt chaotic. This lesson teaches the minimal operating loop: pick the right surface, run one bounded task, inspect the result, and resume the thread cleanly.

Outcomes

Three things to master before you call yourself “started”.

Surface choice

Know when you want the explicitness of the CLI, the convenience of the IDE, or a cloud task that can continue after you disconnect.

Task sizing

Your first request should be specific, low-risk, and easy to verify. Codex skill grows from clean reps, not dramatic first attempts.

Thread hygiene

Understand that a thread carries context. Resume intentionally, and avoid running multiple threads against the same files.

Workflow

A reliable first-session loop

01

Install and launch

Start with the CLI or sign in through your preferred surface. The goal is not feature exploration yet; it is one clean working session.

02

Choose one bounded task

Pick something like a small bug fix, a test, a doc rewrite, or a single component change with a clear done-when.

03

State how you will verify

Before Codex starts, decide whether success means a diff review, a test run, a build, or a manual check.

04

Inspect the result

Read the diff, review commands, and decide whether the task needs a follow-up prompt or is actually complete.

05

Resume, do not restart blindly

If you need a second pass, resume the thread so Codex keeps the local context instead of recreating the task from scratch.

Command board

Minimal controls worth memorizing early

CLI quickstart

Launch and resume

npm i -g @openai/codex
codex
codex resume --last
Inside a session

Use a few controls well

/model
/status
/plan
/diff
/review

Practice

Three drills to make your first Codex reps clean

Drill 1: first launch

  • Install Codex CLI.
  • Open a throwaway repo or safe branch.
  • Ask for one tiny edit with a clear validation method.

Drill 2: resize a vague task

  • Write a bad request like “improve this project”.
  • Shrink it to one file, one goal, one check.
  • Run the smaller version first.

Drill 3: resume instead of restart

  • Finish a first pass.
  • Resume the thread and ask for one follow-up improvement.
  • Notice how much context you no longer need to restate.
Common mistake

Starting with a giant task

If your first Codex experience is a repo-wide rewrite, you learn confusion, not control.

Common mistake

Running overlapping threads

Two threads touching the same files create context drift, merge pain, and false confidence.