Prompting (Codex)
Interacting with the Codex agent
Prompts
You interact with Codex by sending prompts (user messages) that describe what you want it to do.
When you submit a prompt, Codex works in a loop: it calls the model and then performs the actions indicated by the model output, such as file reads, file edits, and tool calls.
As with ChatGPT, Codex is only as effective as the instructions you give it.
Codex produces higher-quality outputs when it can verify its work. Include steps to reproduce an issue, validate a feature, and run linting and pre-commit checks.
Codex handles complex work better when you break it into smaller, focused steps. Smaller tasks are easier for Codex to test and for you to review. If you’re not sure how to split a task up, ask Codex to propose a plan.
For more ideas about prompting Codex, refer to workflows.
Threads
Context
Goal mode