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.
cd into a directory, run codex, and the session starts from there.
Launches the terminal UI in the current directory, with an optional prompt or image attachment.
Sets what Codex can do without asking first, for the rest of the session.
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.
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.
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 |
|---|---|
codex | Launch the terminal UI in the current directory |
codex exec | Run Codex non-interactively, for scripted or CI-style workflows |
codex resume | Continue a previous interactive session by ID, or the most recent one |
codex resume --last | Reopen the most recent session directly, no picker |
codex doctor | Generate a diagnostic report for install, config, auth, and runtime issues |
| Session Command | What It Does |
|---|---|
/init | Generate an AGENTS.md scaffold in the current directory |
/new | Start a new task inside the same CLI session |
/resume | Resume a saved conversation from your session list |
/compact | Summarise the visible conversation to free up tokens |
/status | Display session configuration and token usage |
/exit | Exit the CLI session |
/ 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.
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, 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.