Codex Tutorial: Use OpenAI's Coding Agent Safely
Start a Codex task by giving the agent a narrow outcome, not a broad wish. Mention the files or modules to inspect, the behavior to preserve, and the command that proves the change works.
Prepare the repository before delegation. A coding agent performs best when dependencies install cleanly, tests are documented, and project-specific instructions explain conventions, architecture, and review expectations.
Use Codex for bounded software work: fixing a failing test, adding a small feature, writing migration notes, improving documentation, or exploring a repository before a human makes a decision.
Review more than the final diff. Read the command log, inspect tests that passed or failed, and look for assumptions the agent made about APIs, environment variables, generated files, or external services.