Coding Editorial example

OpenAI Codex prompt for reviewing and refactoring code in a local repository

An editorial example for reviewing and refactoring code in a local repository in OpenAI Codex, written for our guide and not tested against the vendor

For
OpenAI Codex
Source
AI Tool Atlas guide: OpenAI Codex
Checked
Oct 2, 2026

The prompt

Editorial example from our guide
Refactor the payment retry logic in src/billing/retry.ts to use exponential backoff with a maximum of 5 attempts, keep the public function signatures unchanged, update the unit tests, and summarise what changed.

When to use this prompt

  • An editorial example for reviewing and refactoring code in a local repository in OpenAI Codex, written for our guide and not tested against the vendor
  • Task type: Coding. Browse other prompts for the same task below.
  • Written for OpenAI Codex; other chat assistants usually accept it unchanged.
  • No variables to replace: paste it as is.
How to use this prompt: fill the variables, run it in OpenAI Codex, check the resultYOU FILL INReady to runPaste the prompt as isNo variables to replaceTHE PROMPTOpenAI Codex33 words · 1 linesource: editorial exampleYOU GETThe resultAn editorial example for reviewin…check the result against the tipscopy, paste, run in OpenAI Codexfill → run → check · prompts are copied word for word from their source
How to use this prompt: what to fill in, where to run it, what comes back

How to check the result

  • Run your test suite and linter yourself.
  • Inspect the full diff before committing.

This prompt was written as an example for our guide and has not been run against the tool. Expect to adapt it to your case. How we document tools.

Where to run it

More coding prompts

Coding Vendor library

Sample prompt for proactive action

By default, implement changes rather than only suggesting them. If the user's intent is
unclear, infer the most useful likely action and proceed, using tools to discover any
missing details instead of guessing. Try to infer the user's inte…
57 words · for Claude
Coding Vendor library

Sample prompt for maximum parallel efficiency

If you intend to call multiple tools and there are no dependencies between the tool
calls, make all of the independent tool calls in parallel. Prioritize calling tools
simultaneously whenever the actions can be done in parallel rather than…
111 words · for Claude