1. Make a checkpoint
cd path/to/your/project
git status # should say "nothing to commit, working tree clean"
If there are uncommitted changes, commit or stash them first. Codex’s review view reflects your Git state, so a clean starting point makes its changes easy to see.
2. Start Codex and look around
codex
Tell me about this project
You’ll see what Codex reads and which commands it wants to run. With the default approval settings, it asks before doing anything outside what your sandbox allows.
3. Ask for one small change
Be specific about the goal, where to look, and how to check it:
In src/utils/date.ts, make formatDate handle null by returning an empty string.
Add a unit test for it and run the test suite.
4. Review before you keep anything
git diff
Run your tests yourself. If you like the change, commit it. If you don’t:
git restore . # throw away the change
# or
git stash # keep it aside for later
5. Write down what you learned
Codex reads AGENTS.md before doing any work. If you had to tell it your test command or a naming rule, put it there so you don’t repeat yourself. See AGENTS.md.
Habits that pay off
- One goal per prompt. Break bigger work into steps.
- Mention the files, commands, and constraints that matter.
- Keep the sandbox on. Give more access only when a task needs it. See sandbox and approvals.
- Use
codex resumeto return to a recent chat instead of re-explaining context.