Codex · Part 3

Codex — Part 3 — Creating and Navigating Your First Project

What actually happens the first time you point Codex at a folder, how it explores a project before touching anything, and the small set of commands that cover most day-to-day sessions.

Quick idea: A Codex project is just a folder. There is no separate project-creation step, you cd into a directory, run codex, and the session starts from there.
codex

Launches the terminal UI in the current directory, with an optional prompt or image attachment.

/permissions

Sets what Codex can do without asking first, for the rest of the session.

codex resume

Picks up a previous session by ID, or reopens the most recent one with a single flag.

Introduction

Part 2 got Codex installed and signed in. This post covers the part that actually matters day to day: starting a session in a real project folder, letting it understand what is there, and making your first change.

As with Claude Code, there is no separate project-creation step. A project is a directory, and a session starts the moment you run codex inside one.

Starting a Session

# Move into the project or scripts folder you want to work in
cd C:\Scripts\ADHealthCheck

# Launch the terminal UI
codex

codex launches the terminal UI in whatever directory you ran it from. You can also pass a prompt directly on the command line to start with a task already in mind, or run codex exec instead for a non-interactive, scripted run.

Practical note: Every session is scoped to the folder you started it in. Working across two unrelated script libraries means two separate sessions, started from two separate directories.

Letting Codex Explore First

Before asking for a change, it is worth spending the first message or two just asking what is actually there, the same habit worth building with any agentic tool.

what does this project do?
what technologies does this project use?
where is the main entry point?
explain the folder structure

This matters more in operations folders than it sounds. A scripts directory built up over several years rarely has a README explaining which script is still in use and which is a leftover. Asking Codex to explain the structure first catches that kind of drift before you ask it to change anything.

Making Your First Change

Describe a real task in plain language rather than a rigid command syntax.

add error handling to the SMB connectivity check function

Codex finds the relevant file and proposes the change before writing it. What Codex is allowed to do without stopping to ask you first is controlled by the approval and sandbox settings covered in Part 7, and can be adjusted mid-session with /permissions.

Important: Codex’s sandbox and approval settings decide how much it can do before checking with you. Review Part 7 before pointing a session at anything you would not want changed without a second look.

Git, Conversationally

what files have I changed?
commit my changes with a descriptive message
create a new branch called fix/smb-timeout

Two built-in commands cover the same ground more directly: /diff shows the git diff, including files git is not yet tracking, and /review asks Codex to review your working tree without needing to describe the request in your own words.

Everyday Navigation

Shell Command What It Does
codexLaunch the terminal UI in the current directory
codex execRun Codex non-interactively, for scripted or CI-style workflows
codex resumeContinue a previous interactive session by ID, or the most recent one
codex resume --lastReopen the most recent session directly, no picker
codex doctorGenerate a diagnostic report for install, config, auth, and runtime issues
Session Command What It Does
/initGenerate an AGENTS.md scaffold in the current directory
/newStart a new task inside the same CLI session
/resumeResume a saved conversation from your session list
/compactSummarise the visible conversation to free up tokens
/statusDisplay session configuration and token usage
/exitExit the CLI session
Practical rule: Type / on its own to see the full list of available commands for the current session, rather than memorising all of them upfront.

Final Thoughts

There is no ceremony to starting a project in Codex. The directory you are in is the project, the first few messages are worth spending on exploration rather than instructions, and /diff and /review cover most of the git workflow without needing to phrase a request by hand.

Once a session feels natural, the next step is making that context persist, so Codex does not need to re-learn your conventions every single time you open a new session.

Key takeaway: cd into the folder, run codex, and ask what is there before asking for a change. /diff and /review are worth reaching for before typing out a git request by hand.
Next in this series

Next, we make that project context stick between sessions: what AGENTS.md is for, what belongs in it, and how to write one that actually gets followed.