Codex is useful both as an interactive coding partner and as a command-line tool. These five commands cover a simple daily workflow.
1. Start an interactive session
codex
Use this when you want to explore a task with Codex in the terminal.
2. Give Codex a focused task
codex "Explain the authentication flow in this repository"
A specific prompt makes it easier to get a useful first pass.
3. Run a non-interactive task
codex exec "Run the tests and fix the failing unit test"
This is handy in scripts or repeatable workflows.
4. Resume prior work
codex resume
Resume a previous session when the task needs more context.
5. Review code
codex review
Use review mode before opening a pull request or merging a change.
The best habit is simple: give Codex a clear goal, inspect the result, and keep the final engineering decision with a human reviewer.