Reviewed November 3, 2026. The fastest useful Codex session starts with a precise target and ends with evidence you can inspect. Use this reference to turn “help with this repo” into a bounded job with a reviewable result.
Choose Your Surface and Execution Location
Codex is available through developer surfaces including the CLI and IDE extension. The ChatGPT desktop app also provides a Codex selection for software development. Cloud work uses a configured remote environment. A task running remotely may have different files, dependencies, credentials, and network access from your laptop. Official OpenAI quickstart.
Choose the CLI when the terminal is already your working environment. Choose the IDE extension when the editor’s file context is useful. Before delegating cloud work, confirm the target repository, branch, and environment. Surface names and account access can change, so use the controls available to your organization.
Everyday Jobs at a Glance
| Job | Supply | Request |
|---|---|---|
| Understand unfamiliar code | Exact feature or entry point | Execution path and relevant file references |
| Fix a regression | Steps, expected result, actual error | Reproduction, minimal fix, relevant checks |
| Add a small feature | User behavior and acceptance criteria | A scoped implementation and verification |
| Review changes | Diff or comparison branch | Prioritized defects with concrete triggers |
| Improve a test | Behavior the test should protect | A test that catches a meaningful failure |
| Update documentation | Source behavior and audience | Accurate edits with commands checked |
| Explain a failure | Exact command and full relevant error | Cause, evidence, and next diagnostic step |
| Prepare a handoff | Current work and open questions | Changed files, results, limits, next action |
Your Five-Minute Starting Workflow
- Confirm the workspace. Open the intended repository. Check its branch and existing changes before granting edits.
- Load the rules. Ask Codex to read the applicable repository instructions and identify the relevant build and check commands.
- Name one deliverable. Give a concrete behavior, allowed paths, and completion criteria. Leave unrelated cleanup for a separate task.
- Set execution boundaries. Confirm permissions, writable roots, network needs, and whether the job is analysis or implementation.
- Get the first proof. For a bug, ask for a reproduction. For a feature, ask which existing behavior and check will establish success.
Repository instructions belong in AGENTS.md. Codex loads global and project guidance, with more specific instructions along the path taking precedence. Keep those files short and useful, then ask which instructions were applied if behavior seems surprising. AGENTS.md guidance.
Copy This Task Brief
Work in [repository and branch].
Outcome: [observable behavior or deliverable].
Current behavior: [what happens, with reproduction].
Expected behavior: [what should happen].
Read the applicable repository instructions first.
Allowed edits: [paths]. Preserve unrelated existing changes.
Out of scope: [behaviors, integrations, production].
Acceptance: [specific checks and expected results].
Complete the local change and review its diff. Report changed
files, commands run, results, and remaining uncertainty.
Do not deploy, delete data, send messages, or change credentials.
Add a screenshot when a visual defect is difficult to describe. Include the viewport and interaction that exposes it. For an API error, include a sanitized request shape and response rather than a screenshot of a terminal full of unrelated logs.
Safe CLI References
Run commands from the intended checkout. These commands either show help or start a named workflow; starting a session can permit tool use according to its active settings. Check permissions before asking for changes. The CLI supports resuming chats, reviews, images, and connected tools. Codex CLI documentation.
# Inspect the installed command reference.
codex --help
# Start a repository analysis with filesystem writes constrained.
codex --sandbox read-only "Explain this repository's main entry points."
# Choose a saved interactive session to continue.
codex resume
# Request a review of current uncommitted changes.
codex review --uncommitted
The read-only sandbox constrains filesystem writes, but still review what data the session can read and which external tools are connected. Avoid sharing secrets in prompts or logs. A command example does not replace your organization’s environment policy.
| Interactive Command | Use It For |
|---|---|
/status |
Inspect session and context information |
/permissions |
Inspect or adjust what the session may do |
/plan |
Enter planning for a task that needs design decisions |
/review |
Start a focused review workflow |
/compact |
Reduce accumulated conversation context |
These are Codex developer-session commands, not a universal ChatGPT web command list. Check your session’s slash menu for availability. Official developer command reference.
Prompts for High-Value Work
Understand Before Editing
Trace [feature] from its entry point to its side effects.
Read only. Return the relevant files, data flow, security checks,
and the smallest place a change could belong. Mark uncertain
behavior that requires runtime evidence.
Repair Without Broad Cleanup
Reproduce [failure] using [steps]. Explain the cause from evidence.
Fix only what is needed for [expected result]. Preserve the public
interface and unrelated changes. Run the affected checks and
report any check that could not run. Review the final diff.
Request a Review That Finds Bugs
Review this diff for correctness and security. Prioritize concrete
regressions, authorization gaps, data loss, and missing failure
handling. For each finding give the file location, trigger,
consequence, and suggested correction. Separate verified defects
from questions. Do not rewrite code during this review.
Keep Context Small and Accurate
Point to exact files and symbols before asking for a repository-wide search. Paste the relevant error once. State which requirements supersede earlier ones. Long sessions accumulate old assumptions, so request a short checkpoint before changing tasks or compacting context.
Save a handoff: active objective, branch, changed files, accepted
decisions, commands and results, unresolved issues, and next step.
Do not count proposed actions as completed work.
Keep durable project rules in repository instructions. Keep temporary task details in the brief. Do not turn every debugging observation into a permanent rule that future work must carry.
Recover Without Making the Problem Bigger
| Problem | Next Move |
|---|---|
| Codex edits the wrong area | Interrupt, inspect the diff, restate allowed paths |
| A check fails again | Supply the exact output and ask for a cause before another patch |
| A dependency is unavailable | Record the missing prerequisite; do not call the check passed |
| The session uses stale assumptions | Restate current sources and request a checkpoint |
| A review finds a defect | Reproduce the trigger, fix it, rerun affected checks |
Sandboxing and approval controls govern different parts of execution. Review the actual environment settings rather than assuming a sentence in a prompt is an enforced boundary. Connected tools may also have their own authority. Agent approvals and security.
The Completion Checklist
- The requested behavior is implemented in the intended checkout.
- Existing user changes remain intact.
- The diff contains no unrelated edits or exposed credentials.
- Relevant checks ran, with failures and skipped checks disclosed.
- A reviewer can understand what changed and why.
- Local completion, remote execution, and production deployment are reported separately.
Get more practical references in the AI Hub, or compare approaches with the Claude cheat sheet. To establish a repeatable engineering workflow for your team, book an AI consultation.