Give a coding task in the context of a repository. Codex can inspect the project, change files, run checks and return work for you to review.
Discover the examplesCodex works with software projects and developer tools. Describe the outcome you want, give it the right project context, then inspect the changes and test results.
THE POSSIBILITIES
What can you do with Codex?
Start with a goal you understand. Let the tool help you explore the route.
01Understand an existing codebase before changing it
02Implement a feature or fix in project files
03Run tests, builds and other development commands
04Explain code and investigate errors
05Prepare a reviewable change for a developer
A SIMPLE WAY IN
Make your first attempt a useful one.
01
Name the outcome
Describe the change or bug in terms of what a person should be able to do.
02
Point to the context
Share relevant files, error messages, design notes or constraints.
03
Let it inspect and work
Codex can investigate the repository and make a focused change using its available tools.
04
Review the result
Read the diff, check the tests and decide whether the change is ready to keep.
PUT THE IDEA INTO CONTEXT
A few ways to use Codex.
CodingCodex
Trace a bug from its error message
Ask Codex to locate the relevant code, explain a likely cause and test a focused fix.
See the example
A prompt to try
Investigate why the settings page crashes when the saved theme is missing. Follow the existing project patterns, explain the cause, add a safe default and a focused test, then report which checks you ran. Do not change unrelated files.
What you could create
A reviewable code change with a safe fallback, a focused regression test and a summary of the files and checks involved. A developer should inspect the diff and confirm the expected behaviour.
Make it your own
Open the correct repository
Describe the failure and expected behaviour
Ask for a focused fix and regression test
Review the diff and run relevant checks
CodingCodex
Plan a reusable interface component
Translate a design need into a small implementation plan grounded in the existing codebase.
See the example
A prompt to try
Inspect this repository and propose a reusable alert component for success, warning and error messages. Follow its current styling and accessibility patterns. First show the files you would touch and the keyboard and screen-reader behaviour; wait for review before implementation.
What you could create
A concise component proposal that identifies relevant files and explains the semantics, accessible name and visual variants before any code is changed.
Make it your own
Give Codex the repository
Describe the user need and variants
Ask it to inspect local patterns
Review the plan before asking for code
CodingCodex
Find a missing test case
Use Codex to compare a behaviour with existing tests and propose one useful regression check.
See the example
A prompt to try
Read the date-formatting function and its tests. Find one important edge case the tests do not cover, explain why it matters, and add a focused test using the existing test style. Do not change the function unless the test exposes a bug.
What you could create
A targeted test for an uncovered boundary case and a report of whether the existing implementation passes it, using the repository's established test style.
Make it your own
Point to the code and test area
Ask for a meaningful uncovered edge case
Keep the requested change small
Read the test and verify it fails for the intended regression
KEEP YOUR JUDGEMENT IN THE LOOP
Useful to know before you begin.
A passing check does not prove every behaviour is correct; review the code and test the intended experience.
The work it can perform depends on the repository, tools and permissions it has been given.
Changes that affect production data, security or other people still need careful human review.
BEFORE YOU SPEND
What does it cost to get started?
Free
$0 USD
Free ChatGPT plan
Limited Codex access; Codex Cloud is not included.
Plus
$20 USD
Monthly; US price
Includes focused Codex use; limits apply.
Pro
From $100 USD
Monthly; US price
Higher usage; account tiers and usage allowances differ.
Codex access through ChatGPT uses the plan's included allowance or credits. API-key use follows separate developer API pricing. The listed Plus price is the US price shown on OpenAI's Codex page.
Availability: Codex is included across ChatGPT plans, but features such as Codex Cloud have separate plan, account and workspace eligibility requirements.
Prices are a dated reference, not a quote. Check the linked vendor page before paying. Trials, introductory discounts, tax and eligibility can change. GBP and USD are shown as published, not converted.