Key takeaways
- Codex is a coding agent: it works inside a copy of your repository, runs commands and tests, and proposes changes for you to review.
- Use ChatGPT to learn, discuss and design; use Codex when the change has to land in a real codebase.
- Codex does not use ChatGPT's memory; put project rules in an AGENTS.md file in the repository instead.
- Codex has its own usage limits, separate from ChatGPT messages, and no plan gives unlimited use.
- Start with a small, well-tested repository and a narrow task, and review every diff before merging.
ChatGPT Codex is OpenAI's software engineering agent. Unlike chatting about code, Codex works on your actual repository: it reads the code, edits files, runs commands and tests in a sandbox, and gives you a diff or pull request to review. You can use it from ChatGPT in the browser, from the Codex CLI in your terminal, or from an IDE extension. This page explains how it works, which models power it, when to use it instead of ChatGPT, how memory and limits differ, which plans include it, and how to start.
What is ChatGPT Codex?
Codex is OpenAI's coding agent. You give it a task such as "fix the failing date parser test", and it works in a copy of your repository, makes the change, runs the tests and presents the result for review.
It is available in several places that share one account: the Codex section of ChatGPT, which runs tasks in OpenAI's cloud on a connected GitHub repository; the open-source Codex CLI, which runs on your own machine; and extensions for editors such as VS Code. Cloud tasks can run in parallel, so you can hand off several small tasks and review them later. The name Codex was first used in 2021 for an earlier code model; today it refers to the agent and its coding-tuned models.
How does ChatGPT Codex work?
Codex runs a loop: it reads your request and the relevant code, plans the change, edits files, runs commands such as tests and linters, reads the results and repeats until the task is done or it needs your input.
For cloud tasks, Codex starts a sandboxed container with your repository, installs dependencies using setup steps you can configure, and works inside it, so it cannot touch your machine. When finished, it shows the diff, a summary and the commands it ran, and you can open a pull request. With the CLI it works in your local folder, and you choose how much freedom it has, from asking before every command to working automatically inside the project. Instructions in an AGENTS.md file at the repository root tell it how to build, test and style the code.
What are the GPT Codex models?
Codex models are versions of OpenAI's GPT models tuned for software engineering: writing code, following repository conventions, running tests and working through long agentic tasks. The Codex agent uses them by default.
Also asked as: what are gpt codex models
The first Codex model, released in 2021 and described in OpenAI's paper on evaluating code models, powered the original GitHub Copilot and was later retired. The current generation is built on OpenAI's GPT-5 family, with coding-specialised variants such as GPT-5-Codex, and newer versions arrive regularly. You can usually choose the model and reasoning level in the Codex settings or CLI: higher reasoning is slower but better for hard changes. Developers can also call coding models through the OpenAI API. Check OpenAI's model list for the current names.
When should I use ChatGPT vs Codex?
Use ChatGPT to learn, explain, brainstorm and design. Use Codex when you want a change made in a real codebase, tested and delivered as a diff or pull request.
Also asked as: when to use chatgpt vs codex
A simple rule:
- ChatGPT: "Explain how JWT authentication works", "compare FastAPI and Flask for my project", "review this function I pasted".
- Codex: "Add JWT authentication to this FastAPI app with tests", "upgrade the project to the new library version and fix the breaking changes".
ChatGPT sees only what you paste, so its code suggestions do not know your project structure. Codex sees the whole repository and can run it, which makes its changes far more likely to work. Many developers use both: design in ChatGPT, implement with Codex.
Should I use Codex or ChatGPT for work?
For engineering work in a team repository, Codex is the better fit because it works on the code, follows the repository's rules and produces reviewable pull requests. ChatGPT is better for documents, analysis, emails and thinking through problems.
Also asked as: when to use codex vcs chatgpt work
On business and enterprise plans, admins control which repositories Codex can access and how its environments are configured, which matters for company code. Keep the usual review process: Codex output goes through code review and continuous integration like any teammate's work. Never paste secrets into ChatGPT or Codex prompts, and keep API keys in your environment configuration. If your employer restricts AI tools on its code, follow that policy; using a personal account on company code is a common way to break it.
Do ChatGPT and Codex share memory?
No. Codex does not use ChatGPT's memory of your past conversations. It learns about your project from the repository itself and from instructions you write, usually in an AGENTS.md file.
This is deliberate. A coding agent should behave the same for everyone working on a repository, so project knowledge belongs in files that are versioned with the code, not in one person's chat history. A good AGENTS.md covers how to install dependencies, run tests and lint, the project's structure, coding conventions, and things to avoid. You can add more specific files in subfolders for parts of a large project. Your account settings, such as connected repositories, are shared across ChatGPT and Codex, but conversation memory is not.
Are ChatGPT and Codex limits different?
Yes. Codex has its own usage limits, separate from ChatGPT message limits, and they vary by plan. Local CLI use and cloud tasks are counted, and limits reset over rolling time windows.
Heavier tasks and higher reasoning levels use more of the allowance than small ones, so a long refactor counts for more than a one-line fix. OpenAI publishes the current limits for each plan in its help centre, and they have changed several times since launch. If you hit limits often, split work into smaller tasks, choose a lower reasoning level for routine changes, and avoid asking Codex to explore a huge repository without pointing it at the right folder. Developers can also run the CLI with an API key and pay per use instead.
Does ChatGPT Plus give unlimited use of Codex?
No. ChatGPT Plus includes Codex with usage limits, and higher plans such as Pro raise them substantially. No plan gives truly unlimited Codex use.
For a student or solo developer, Plus limits are usually enough for regular coding sessions if tasks are well scoped. If you hit the limit, you wait for the window to reset, upgrade, or switch to API-key usage in the CLI. Treat any claim of "unlimited" access through a third-party site as a red flag: shared or resold accounts break OpenAI's terms and can expose your code. Check the plan comparison page for the current inclusion and limits before you decide.
Does ChatGPT Go have Codex?
ChatGPT Go is OpenAI's lower-cost plan, offered first in India and then in other countries. Its features differ from Plus, and whether Codex is included, and with what limits, depends on OpenAI's current plan details.
Codex has been included in Plus and higher individual plans and in business plans. Plan features change, so check OpenAI's pricing page or help centre for what Go includes in your country today rather than relying on a forum post. If Go does not include enough Codex use for you, the alternatives are the Codex CLI with an API key, paying per use, or other coding agents with free tiers. For learning to code, the chat itself on any plan is already a strong tutor.
Is there a ChatGPT Codex tutorial?
Yes. OpenAI's Codex documentation and the Codex CLI repository have setup guides. The fastest way to learn is one small task in a repository with tests, done end to end.
Also asked as: tutorial chatgpt codex
A first session with the CLI:
npm install -g @openai/codex
cd my-project
codex
Sign in with your ChatGPT account, then:
- Ask "explain the structure of this project and how to run the tests".
- Add an
AGENTS.mdwith the test command and coding rules. - Give a narrow task: "add input validation to the signup route and a test for it".
- Approve commands one by one, read the diff, run the tests yourself.
- Commit, then try a cloud task from ChatGPT on the same repository.





