Free OpenAI Codex tutorial

    OpenAI Codex
    tutorial for reliable work

    Use Codex for repository work that needs a visible diff and review evidence. Start with one bounded task, give it the right context, then verify what changed.

    How to use Codex: put durable repository guidance in AGENTS.md, keep reviewed decisions with their owner, and use local memory only as optional recall. This tutorial shows the sequence from a first safe task to a repeatable Codex workflow. Required team rules belong in checked-in AGENTS.md and documentation. Local Codex memories are optional recall, not the source of a required rule.

    Bring this to your first Codex task

    • One outcome you can recognize as done
    • One approved source Codex may use
    • One explicit non-goal
    • One permission boundary
    • One person or check that verifies the result
    Start with one bounded Codex task
    Set AGENTS.md, project context and optional memory
    Verify the diff before accepting it

    Get the full tutorial

    A detailed, practical guide you can use while Codex is open beside your repo.

    • Prompts for messy briefs, plans and verification
    • AGENTS.md, reviewed decisions, local recall, skills and MCP
    • Safe monitors and enterprise governance checkpoints

    No spam. Just the tutorial and useful follow-ups.

    Who this is for

    A practical Codex workflow for work that touches a repository.

    Founders and operators

    Use Codex to turn a messy goal into a scoped plan, a reviewable implementation task and a handoff with evidence. Keep business decisions and external actions behind human approval.

    Developers and technical PMs

    Learn how AGENTS.md, repository context, isolated work, skills and MCP make a codebase easier for Codex to inspect and change safely.

    Teams and enterprise

    Set a bounded pilot, clear permissions and human review before connecting shared company systems.

    Inside the tutorial

    The table of contents is a working system.

    01

    Start an OpenAI Codex task with a contract

    Turn a raw request into a clear outcome, scope, evidence and approval boundary before Codex edits a repository.

    02

    Use AGENTS.md, project context and memory correctly

    Keep required rules in AGENTS.md and docs, shared decisions in reviewed records, and local memories as optional recall.

    03

    Add skills and MCP

    Grow manual successes into skills and connect tools only where permissions, schemas and failure modes are understood.

    04

    Parallelize with control

    Use plans, isolated worktrees and subagents for independent work, then consolidate with explicit checks.

    05

    Run goals and monitors safely

    Use a verifier, material-update rule, stop condition and human approval instead of open-ended autonomy.

    06

    Ship evidence, not narration

    Run type, unit, build, security and browser checks; report what changed, what passed and what remains uncertain.

    The operating loop

    From vague request to durable, trustworthy result.

    Frame

    Turn the raw brief into an outcome, scope, constraints and definition of done.

    Context

    Load the relevant docs, repo rules, project thread, tools and current system facts.

    Work

    Let Codex make the smallest coherent change in an isolated surface, with an explicit verifier.

    Prove

    Verify behavior, inspect the diff and leave a handoff another person can trust.

    AGENTS.md and Codex memory

    How to use AGENTS.md with Codex.

    AGENTS.md is the durable instruction layer for a repository. Keep required rules there or in checked-in documentation. Use Codex memories for helpful recall, not for a rule that must always apply.

    01

    AGENTS.md for required rules

    Keep shared working agreements, repository commands, safety boundaries and verification rules in checked-in AGENTS.md and nearby docs.

    02

    Reviewed state

    Keep decisions, handoffs and active project facts in the system your team reviews and maintains.

    03

    Codex memory for optional recall

    Use local Codex memories as helpful recall from earlier work. They are generated state, not the only place a required rule should live.

    Teams and enterprise

    The governance layer is part of the tutorial.

    The guide includes a team path: start with a bounded pilot and make access, approval and evidence visible before connecting company data.

    Scope the pilot

    Choose approved users, repositories and task types. Name the owner and the exit criteria before expanding access.

    Set access boundaries

    Review the connected systems, read/write actions, approval points and least-privilege defaults with the responsible admin.

    Review and rollout

    Use a small pilot, approved repos, human review and evidence-based exit criteria. Never let a successful demo become an ungoverned production process.

    Questions the tutorial answers

    How does Codex use AGENTS.md?

    Codex uses the applicable AGENTS.md instructions it discovers for the work. Use them for durable repository guidance such as commands, conventions, constraints and the evidence required before a task is done. More specific files can add local rules for the directory where the task runs.

    What is the difference between AGENTS.md and Codex memory?

    AGENTS.md and checked-in documentation hold rules the team can review. Codex memory can carry useful context forward between chats, but it is optional generated state. Do not make it the only place a required rule lives.

    Is this OpenAI Codex tutorial only for software engineers?

    No. The same task framing and verification loop can help technical PMs, founders and operators when the source of truth is a repository or a structured implementation task.

    What makes a Codex workflow reliable?

    A clear outcome, the right context, a small permission boundary, an explicit verification step and a human review point for meaningful decisions or external actions.

    What should I bring to my first Codex task?

    Bring one real task, the relevant repository or documents, the expected finished artifact, and the checks that would prove the change is correct.

    Iwo Szapar

    Created by Iwo Szapar

    Built around reviewable agent workflows.

    This tutorial applies practices Iwo uses when designing reviewable AI workflows: clear context, explicit permissions and evidence another person can review.

    Start your first reliable Codex workflow.

    Get the full OpenAI Codex tutorial, choose one real repository task and build a loop with clear context and review evidence.

    Get the full tutorial