Codex has some extremely powerful models to choose from. The more powerful models generally use more tokens, while the smaller models can be extremely useful for the right jobs while using far less.
That means you don't need to reach for the strongest model every time you ask Codex to write or change some code.
This guide will get you familiar with the different Codex models, the reasoning levels available, and the kinds of coding tasks each one is suited for. We'll also touch on why planning your app before you start the actual coding process might be one of the biggest token savers of all.
The goal is simple: use enough model capability for the job without burning tokens you didn't need to spend.
First: know the Codex model ladder
Codex gives you several models with very different levels of capability and token usage. Knowing roughly where they sit makes everything else in this guide much easier.
OpenAI currently describes GPT-5.6 Luna as its fast, economical option for focused or repetitive work; Terra as a balance of speed, capability and cost for everyday work; Sol as a stronger model for coding and professional work; and GPT-6 Astra as its most capable model for difficult coding and complex problem-solving.
| Model | Where it fits | Good starting point for |
|---|---|---|
| GPT-5.6 Luna | Fastest and cheapest | Small fixes, UI changes, repetitive work |
| GPT-5.6 Terra | Strong budget/general model | Normal day-to-day programming |
| GPT-5.6 Sol | Higher-capability workhorse | Important features, larger systems, app foundations |
| GPT-6 Astra | Strongest model | Difficult bugs, unfamiliar problems, hard architecture |
Luna deserves a little more attention than it usually gets.
If you're changing text, moving controls, adjusting CSS, adding a simple menu option or making another small, clearly defined change, Luna can save a lot of usage.
Terra is the next step up and will probably be enough for more normal development work than many people expect. It gives you more capability while still being a sensible choice when you're trying to conserve usage.
Then you have Sol for more substantial work and Astra when the problem itself is genuinely difficult.
There is no prize for using Astra to change the padding on a button.
The Codex Task Scale
This is one of the easiest ways to think about model choice.
Don't start by asking, Which model is best?
Ask:
What level of task am I actually doing?
| Level | Type of work | Suggested model | Reasoning |
|---|---|---|---|
| 0 | Mechanical edit | Luna | None / Low |
| 1 | Small isolated task | Luna | Low / Medium |
| 2 | Routine implementation | Terra | Medium |
| 3 | Significant feature | Sol | Medium |
| 4 | Complex subsystem | Sol | High |
| 5 | Foundation or major structural work | Sol | High / XHigh |
| 6 | Difficult architecture or unfamiliar problem | Astra | High / XHigh |
| 7 | Extremely difficult or critical problem | Astra | Max |
The exact reasoning options available can depend on the model and your Codex setup, but the general rule holds: higher reasoning can help with genuinely difficult work and also consumes more of your allowance.
The important part of the table isn't memorizing every row. It's learning to recognize the difference between routine work and difficult thinking.
Suppose you're building a basic to-do app.
Creating another normal screen, adding a filter, or saving a few settings is probably Terra territory.
Now suppose you're beginning a much larger app with accounts, a database, offline behavior, several major screens and features that will all rely on the structure you create today.
That's when Sol with High reasoning starts making sense.
And if you're designing something genuinely unusual, dealing with a very difficult technical problem, or trying to untangle a system nobody understands yet, that's when Astra earns its keep.
Big jobs are not always hard jobs
This is one of the easiest things to get wrong.
Imagine Codex needs to update 5,000 lines of code.
That sounds like a serious job.
But perhaps all it needs to do is replace an old, predictable pattern with a new one throughout the project.
The work could effectively be:
Find A → change it to B → repeat → verify.
That's a lot of code, but not necessarily a lot of thinking.
Terra may be perfectly capable of doing it.
Now imagine the opposite.
You have 40 lines of code controlling two things that can happen at the same time. Once every twenty or fifty runs, they happen in the wrong order and break something.
Now Codex has to work out what happens first, what data is being changed, why the bug only appears occasionally, and whether fixing one path will break another.
The code is tiny.
The problem isn't.
That might be an Astra job.
Choose the model based on how hard the problem is, not how much code Codex has to type.
This single idea can save a lot of wasted usage.
Four questions that tell you what model to use
If you're not sure where a task belongs on the scale, ask four practical questions.
| Question | Easier end | Harder end |
|---|---|---|
| How much of the project does this touch? | One screen or file | Many parts of the project |
| Is this a common job? | Normal button, form, API call | Unusual system or unfamiliar problem |
| Will other features depend on this later? | Easy isolated change | Foundation other features will build on |
| How bad is it if Codex gets it wrong? | Easy to undo | Expensive or difficult to rebuild |
If nearly everything is on the easy side, start with Luna.
If it's normal programming work with some decisions involved, Terra is a strong choice.
If several parts of the project need to work together, or the decision will matter later, move to Sol.
If almost everything is on the difficult side, you're getting into Astra territory.
There is one question in that table worth paying special attention to:
Will other features depend on this later?
The beginning of a project can contain surprisingly little code while still being one of the most important stages.
If you're setting up how a large application handles navigation, saved data, accounts, playback, game state or other core behavior, future features may depend on those choices.
Spend the reasoning there.
Six weeks later, when you're adding another button using systems that already work, you can come right back down to Luna or Terra.
Some practical examples
Here is what that looks like in normal development.
| Task | Good starting point |
|---|---|
| Change text or spacing | Luna · Low |
| Add a button that uses an existing action | Luna · Low |
| Fix straightforward CSS | Luna · Low |
| Add a normal menu or settings screen | Terra · Medium |
| Build a basic calculator | Terra · Medium |
| Build a simple to-do app | Terra · Medium |
| Connect to a straightforward API | Terra · Medium |
| Add normal database search | Terra / Sol · Medium |
| Build a polished casual mobile game | Sol · Medium / High |
| Set up authentication | Sol · High |
| Add an entitlement or purchase system | Sol · High |
| First AdMob integration | Sol · High |
| Build the foundation of a major planned app | Sol · High / XHigh |
| Build a more advanced simulator | Sol / Astra · High |
| Implement a difficult CarPlay or Android Auto system | Sol / Astra · High |
| Track down a strange timing/concurrency bug | Astra · High / XHigh |
| Redesign the core structure of a large existing project | Astra · XHigh |
Notice how the model doesn't necessarily rise with the number of features.
Once a good foundation exists, a lot of normal feature work becomes cheaper.
That is exactly what you want.
The three-output strategy
There is another useful way to stop overthinking model choice.
For any task, think in terms of three options:
Recommended
This is the model we'd normally use for the job.
If you're adding a substantial search feature involving a database, filters and several screens, that might be:
Recommended: Sol · Medium
Economy
This is the cheaper model that should still have a good chance if the work is clearly explained.
For that same search feature:
Economy: Terra · Medium
You might start there if the project already has good patterns for Codex to follow.
Escalate
This is where you go if the job turns out to be harder than expected.
Perhaps the search system now needs complicated indexing, permission rules and unusual behavior across several types of data.
Now you might move to:
Escalate: Sol · High or Astra · High
This is useful because you don't have to predict the difficulty of every task perfectly before you start.
Start with a sensible model.
If it handles the work cleanly, great.
If it starts misunderstanding what you want, repeatedly fixing the wrong thing, or uncovering a much bigger problem underneath, move up.
Reasoning level matters too
Choosing the right model is only half of it.
Codex also lets you control how much reasoning the model uses.
A good general rule is:
Use more reasoning when the job involves decisions. Use less when the job mostly involves execution.
Changing a button label from “Continue” to “Next” does not need Max reasoning.
Building the first version of a payment or authentication system probably deserves more thought.
A medium-sized feature that follows patterns already established in the project may work perfectly with Medium reasoning.
The same feature, built from scratch with several unclear decisions, may deserve High.
Higher reasoning settings, larger inputs and outputs, and long multi-step tasks can all use more of your Codex allowance.
So turning everything up to maximum is not free intelligence. You're spending more of your allowance.
Spend it where it helps.
Luna and Terra are where you can save a lot
It is easy to focus on the headline models, but Luna and Terra are probably where many developers can make the biggest savings.
Luna is OpenAI's fastest and lowest-cost GPT-5.6 model, while Terra is designed to balance capability, speed and cost.
That makes both especially useful for the long middle of a project.
The important foundation has already been built. Now you're adding screens, controls, forms, ordinary API calls, smaller features and polishing.
That work still matters.
It just doesn't all require the most expensive reasoning available.
A sensible workflow might begin with Sol High while the important foundations are being created, move heavily into Terra Medium during normal feature development, and use Luna Low for small finishing jobs.
Then, when you hit something genuinely difficult, bring Sol High or Astra back in.
The model should change as the job changes.
Planning might be the biggest token saver of all
One easy way to save Codex usage is to arrive with a reasonably clear plan.
For larger projects, it can make sense to do the planning in ChatGPT first. Work out what the app should do, decide the main features, think through the structure, and turn that into clear instructions before you start the actual coding process.
Then Codex can concentrate on building it.
You can ask Codex to figure everything out as it goes, but that means using coding-agent tokens while it explores questions that could have been settled beforehand.
Plan in ChatGPT. Build in Codex.
We'll cover that workflow in more detail separately, because it deserves an article of its own.
When saving tokens becomes expensive
There is one trap on the other side of this.
Don't become so determined to save usage that you hand difficult work to a model that keeps getting it wrong.
If Luna fails three times on an important feature, you haven't saved anything.
If Terra builds a poor foundation and you spend the next afternoon rebuilding it, the cheap option wasn't cheap.
Model efficiency isn't about always spending less.
It is about spending where it makes a difference.
Use Luna for the jobs Luna can comfortably handle.
Let Terra carry a lot of normal development.
Spend on Sol when important pieces need to fit together.
Bring out Astra when the problem is genuinely hard.
That's the whole system.
Spend reasoning where mistakes compound. Save tokens where the work is mostly straightforward.
Once you start looking at Codex tasks this way, choosing a model becomes much easier — and your usage tends to last a lot longer.
