This guide shows you what to do after you install Codex. A session is one conversation with Codex. It starts when you type codex and ends when you quit.
Go to your project folder
Codex works on the files in the folder where you start it. Use a test folder first. Folders in the terminal shows how to make a folder and go into it with cd.
OpenAI suggests that you save a checkpoint of your work before and after a task, so that you can undo changes. If you use Git (a tool that saves versions of your files), make a commit first.
Start Codex
codexType your first request
Describe what you want in plain words and press Enter. OpenAI's first example:
Tell me about this projectUnderstand what Codex may do
Codex has two safety layers:
- The sandbox decides what Codex can touch. By default it can write only inside the folder where you started it, and it has no internet access.
- The approval policy decides when Codex must stop and ask you. By default it asks before it edits files outside the folder or runs commands that need the internet.
When Codex asks, read the action and the command before you approve. If you are not sure, refuse and ask Codex to explain.
Change the permissions
Type /permissions and press Enter. Pick a preset:
- Read Only lets you chat and plan. Codex makes no changes without your approval.
- Auto lets Codex read, edit and run commands inside the folder without asking.
Codex confirms the new setting. It stays until you change it again. To see the current settings, type /status.
Interrupt Codex
While Codex works, the screen shows esc to interrupt. Press Esc to stop the current task. Then type a new instruction.
Quit the session
Type /quit or /exit and press Enter. Codex closes at once, so save important work first.
Useful commands inside a session
| Command | What it does |
|---|---|
/permissions | Changes what Codex may do without asking |
/status | Shows the model, the permissions and the usage of this session |
/new | Starts a new chat |
/init | Makes a starting AGENTS.md note file for the project |
/quit | Quits Codex |
To go back to an earlier chat in this folder, start Codex with codex resume.
Next, give Codex a superpower: install a skill.
Sources
- developers.openai.com/codex/cli
- developers.openai.com/codex/agent-approvals-security
- developers.openai.com/codex/cli/slash-commands
- developers.openai.com/codex/pricing
- github.com/openai/codex/blob/main/codex-rs/tui/src/status_indicator_widget.rs