Quick Start
Start an interactive session
From your project root:
In the TUI (Terminal UI), describe a task in natural language, for example:
Common TUI commands:
Recommended safe defaults
For local development, set sandbox and approvals explicitly (or persist in config.toml):
Codex can edit and run tests inside the workspace; out-of-bounds actions pause for approval.
Non-interactive: codex exec
For scripts, CI, and one-shot tasks:
CI-friendly combination:
When using
neverfor approvals in CI, pair it with a strict sandbox and read-only checkout to avoid accidental repo changes.
Set working directory
Codex loads the AGENTS.md chain from the repo root down to services/api.
Attach images
The CLI supports screenshots and design assets (see codex --help for flags), e.g. for UI tasks:
First end-to-end mini project: health check endpoint
Goal: Add GET /health to an existing web service and add tests.
- (Optional) Create a Git checkpoint
- Add a minimal AGENTS.md at the repo root
- Start Codex
- Example prompt
- Human review
Work with Git checkpoints
Codex edits files directly. Recommended workflow:
- Before:
git stashor a new branch - After:
git diff+ tests + manual commit - App / IDE may offer checkpoint concepts depending on version
Next steps
- Architecture & Runtime: instruction chain and tool loop
- AGENTS.md: team conventions in the repo
- Practical Examples: longer end-to-end flows