Lesson 04 of 11 · Module 4

OpenAI Codex CLI and desktop command centre

Teach Codex as a project agent across CLI, desktop, cloud, IDE and GitHub, with sandbox, approval and review habits first.

Built from aikickstart_sec04.md, Codex research and existing app walkthrough assets

This is the coding-agent module. The learner should understand that Codex is powerful because it can inspect, edit, run, review and coordinate work, so the first skill is controlling scope.

What to understand

  • Codex CLI is best when the task lives in a folder, terminal or Git workflow.
  • Codex desktop is a command centre for projects, threads, worktrees, review and browser-backed verification.
  • Sandbox and approval settings define how the agent can act; the review pane defines how the human checks it.
Visualisation

Codex safe work loop

  1. 1Explore

    Read repo shape and constraints.

  2. 2Plan

    Restate implementation and verification path.

  3. 3Edit

    Make the smallest scoped change.

  4. 4Verify

    Run build/test/browser checks.

  5. 5Review

    Inspect diff before commit or handoff.

Step by step

1

Start read-only

Start read-only - product screen reference

Have Codex inspect the repo and name the affected files before editing.

HintThe first useful output is a scoped plan, not a diff.

2

Review the app surface

Review the app surface - product screen reference

Open the relevant UI and verify the visible behaviour before claiming it is ready.

HintBrowser checks catch layout and routing mistakes builds cannot.

Reference screens

Course screenshots and visual references for the lesson flow. Re-check the live product before paid delivery or public launch.

Screen reference
Codex CLI: Terminal Install Codex CLI
Codex CLI: Terminal Install Codex CLI
Codex CLI: Terminal Verify Install
Codex CLI: Terminal Verify Install
Codex CLI: Terminal First Run Sign In Screen
Codex CLI: Terminal First Run Sign In Screen
Codex CLI: Terminal Chatgpt Sign In
Codex CLI: Terminal Chatgpt Sign In
Codex CLI: Terminal Cd Into Repo
Codex CLI: Terminal Cd Into Repo
Codex CLI: Terminal Read Only Session
Codex CLI: Terminal Read Only Session
Codex CLI: Terminal Read Only Question
Codex CLI: Terminal Read Only Question
Codex CLI: Terminal Status
Codex CLI: Terminal Status
Codex CLI: Terminal Workspace Write Session
Codex CLI: Terminal Workspace Write Session
Codex CLI: Terminal Task Brief
Codex CLI: Terminal Task Brief
Codex CLI: Terminal Approval Prompt
Codex CLI: Terminal Approval Prompt
Codex CLI: Terminal Diff
Codex CLI: Terminal Diff
Codex CLI: Terminal Verify Test
Codex CLI: Terminal Verify Test
Codex CLI: Terminal Commit
Codex CLI: Terminal Commit
Codex CLI: Codex CLI Help
Codex CLI: Codex CLI Help
Codex CLI: Codex CLI Login
Codex CLI: Codex CLI Login
Codex CLI: Codex CLI MCP
Codex CLI: Codex CLI MCP
Codex CLI: Codex CLI Plugin
Codex CLI: Codex CLI Plugin
Codex CLI: Codex CLI Sandbox
Codex CLI: Codex CLI Sandbox
Codex App: course walkthrough window
Codex App: course walkthrough window
Codex App: integrated terminal
Codex App: integrated terminal
Codex App: review pane
Codex App: review pane
Hands-on task

Build a Codex first-run checklist for a safe repo task: inspect, plan, edit, verify, review.

What you produce

A Codex task brief and review checklist.

Production prompt examples

Codex repo task brief
Goal:
[What outcome should exist by the end of this lesson?]

Context:
[Audience, account tier, device, constraints, and current workflow.]

Inputs:
[Screens, docs, local files, or example data allowed for this exercise.]

Allowed actions:
[Read, draft, compare, summarise, or inspect.]

Ask before:
[Connecting apps, writing to files, sending externally, spending quota, changing settings.]

Output:
[The exact worksheet, plan, checklist, or capture pack to produce.]

Definition of done:
[How the learner or facilitator checks the result.]

Start by restating the plan in five bullets before executing.

Common mistakes to avoid

  • Running broad edits before mapping the repo.
  • Committing without build/browser verification.
  • Confusing approval policy with file-system sandboxing.

Key terms

Sandbox
The boundary controlling what files/commands/network access the agent can use.
Review pane
The human inspection surface for diffs and proposed changes.

Resources

Checkpoint

What command or browser check proves the Codex task worked?