GPT-6 in Codex: Choosing Between Astra, Sol and Luna

GPT-6 Astra, Sol and Luna with their list prices and the Codex configuration setting that assigns each one: review model, default model and subagent model

On Tuesday OpenAI released GPT-6 Sol and GPT-6 Luna, nearly three weeks after GPT-6 Astra. With that the GPT-6 family has a model at each price point, and all three are in Codex, in the API, in Microsoft Foundry and in GitHub Copilot. For a team that uses a coding agent every day, the question has changed. It is no longer which model to use. It is which model to use for which part of the work, because the three differ in price by a factor of a hundred and Codex can now be told to use different ones for planning, for delegated steps and for review.

This article sets out what has been published about the three models, with a source beside each figure. It then does two things an architect can check: it works out from the price list what an agent session costs and what changes that cost, and it gives a Codex configuration that assigns one model to each kind of work, and runs the Codex CLI with that configuration against a local stand-in for the API to see what the CLI really sends. The February article on GPT-5.2-Codex and the June article on prompt caching economics cover the ground before this release; several rules have changed since.

ℹ️
SCOPE

Facts about the models come from OpenAI’s changelog and model pages, Microsoft’s and GitHub’s announcements, and the Codex release notes, each linked where it is used. Benchmark figures are OpenAI’s own, quoted from press coverage of its launch posts, and are marked as such. The cost figures are arithmetic on list prices for modelled sessions whose token counts are assumptions. Codex CLI 0.157.1 was run for real, against a local stand-in that plays a script and reaches no model. So the article shows what Codex sends and how it is priced, and nothing about how well any of the three models writes code.

The timeline

DateWhat happenedSource
9 July 2026GPT-5.6 family released, with explicit prompt caching controlsOpenAI API changelog
3 SeptemberGPT-6 Astra released. Reasoning effort can be changed mid-conversation without losing the cached prefix. Codex CLI 0.153.0 ships the same dayOpenAI API changelog, Codex release notes
8 SeptemberPrompt Cache Diagnostics generally available in the Responses APIOpenAI API changelog
22 SeptemberGPT-6 Sol and GPT-6 Luna released in the API, Codex and ChatGPT. Generally available in Microsoft Foundry and rolling out in GitHub Copilot the same day. Codex CLI 0.156.0OpenAI announcement, Microsoft, GitHub, Codex release notes
25 SeptemberFix for an image-encoding bug that degraded image understanding in Sol and LunaOpenAI API changelog

What has been published

PropertyAstraSolLunaSource
PositioningMost capable, for the most demanding workComplex coding and agentic workflowsMost efficient, for focused high-volume tasksmodel pages (OpenAI)
Input, per million tokens$10.00$2.00$0.10Microsoft Foundry announcement
Cache read$1.00$0.20$0.01Microsoft Foundry announcement
Cache write$12.50$2.50$0.125Microsoft Foundry announcement
Output$50.00$10.00$0.50Microsoft Foundry announcement
Context window and output1,050,000 and 128,000 tokensthe samethe sameOpenAI model pages
Long-context ruleOver 272,000 input tokens: input and cache at 2x, output at 1.5x, for the whole requestthe samethe sameOpenAI model pages
Reasoning effortlow to maxnone to max, default mediumnone to max, default mediumOpenAI model pages
Input and outputText and images in, text outthe samethe sameOpenAI model pages
Knowledge cutoff30 April 202620 April 202618 May 2026OpenAI model pages
Processing optionsBatch and Flex at half price, Fast mode at doublethe samethe sameOpenAI model pages
CodexAll three are selectable. Sol and Luna for Plus, Pro, Business, Enterprise and Edu; Enterprise administrators enable themOpenAI announcement, 9to5Mac
GitHub CopilotReleased earlierPro+, Max, Business, EnterprisePro and above; usage-based billingGitHub changelog
Microsoft FoundryStandard and ProvisionedStandard, Provisioned and Priority; generally availableStandard; generally availableMicrosoft Foundry announcement

OpenAI says the Sol and Luna prices are half the promotional prices of their GPT-5.6 counterparts and that the cut is permanent, made possible by cheaper caching and inference. It also says both use fewer tokens for the same work than the GPT-5.6 models of their class.

On quality there are only OpenAI’s own numbers so far, and they are about more than coding. As reported from its launch posts: Astra scores 72.6% on OSWorld 2.0, 57.7% on Terminal-Bench 4.0 and 74.1% on DeepSWE v1.1 (DataCamp); Sol at its highest effort scores 60.5% on OSWorld 2.0, and OpenAI describes Astra as still its best model for computer use (9to5Mac). None of these says how each model does on your repository. A community run on the announcement thread had all three of a small set of coding tasks passing on both Sol and Luna, with Luna at a tenth of Sol’s cost or less; treat it as an anecdote and run your own.

GPT-6 Astra, Sol and Luna with their list prices and the Codex configuration setting that assigns each one: review model, default model and subagent model
The three models, their list prices, and the Codex setting that assigns each one.

Architecture: where the model is chosen

A coding agent does not make one kind of request. In a single piece of work it plans, runs many small steps (read a file, run a test, apply an edit), may hand parts to subagents, and at the end reviews what changed. Codex exposes a separate setting for each of those, so the choice of model is a routing decision, made in configuration.

%%{init: {'theme':'base','themeVariables':{'primaryColor':'#FFF3E0','primaryTextColor':'#232F3E','primaryBorderColor':'#FF9900','lineColor':'#232F3E','clusterBkg':'#F8FAFC','clusterBorder':'#CBD5E1','edgeLabelBackground':'#FFFFFF','nodeTextColor':'#232F3E'}}}%%
flowchart TD
    T["A task for Codex"] --> P["Plan
model, plan_mode_reasoning_effort"] P --> M["Main session
model, model_reasoning_effort"] M --> S["Subagents for delegated steps
agents.default_subagent_model"] S --> M M --> R["Review of the change
review_model"] R --> H["Human approval
and the usual pull-request gates"] style M fill:#FFF3E0,stroke:#FF9900,stroke-width:2px,color:#232F3E style S fill:#F0FFF4,stroke:#1D8102,stroke-width:2px,color:#145202 style R fill:#F3E8FF,stroke:#7C3AED,stroke-width:2px,color:#4C1D95 style H fill:#EBF8FF,stroke:#0073BB,stroke-width:2px,color:#004C74
OptionAdvantagesDisadvantages and risksCost and operations
One model for everything, the most capableNothing to tune. Best chance on hard problemsPays the top price for reading files and running tests. Usage limits are reached soonerHighest by a wide margin
One mid-range model for everythingSimple. A sound defaultNo extra scrutiny at review. Bulk work still costs more than it needs toA fifth of the first option at list prices
A model per roleEach step is priced for what it needs. An independent, stronger reviewerMore configuration to own. A weak worker can produce plausible, wrong changes that the review must catchLowest for the same work, if the work still gets done
The cheapest model for everythingVery low cost, high limitsMost likely to fail on multi-step reasoning. Failures cost engineer time, which is not on the token billLowest on paper

Three rules in the price list

Three rules decide most of what an agent session costs, and two of them are new since the GPT-5 models.

  • Cache reads cost a tenth of the input price. This is as before.
  • Cache writes cost 1.25 times the input price. On these models a token written to the cache is billed at the write rate in place of the input rate. In the default mode the service places a cache breakpoint at the end of the latest message, so the new part of every request is a write. Earlier models had no write charge.
  • A request with more than 272,000 input tokens costs double. Input and cache rates are multiplied by two and output by one and a half, and the multiplier applies to the whole request, not to the part above the line. The context window is 1,050,000 tokens; the price list changes at about a quarter of it.

The cost of one request, with those rules, is a few lines.

    def request(self, model: str, uncached: int, read: int, written: int, output: int, processing: str = "standard") -> float:
        """Dollars for one request. The three input figures are disjoint and add up to the prompt."""
        prices = self.models[model]
        long = uncached + read + written > self.long_context_over
        input_cost = (uncached * prices.input + read * prices.cache_read + written * prices.cache_write) * (self.long_input_multiplier if long else 1)
        output_cost = output * prices.output * (self.long_output_multiplier if long else 1)
        return (input_cost + output_cost) * self.processing[processing] / 1_000_000
== 1. One request: 100,000 tokens in, 5,000 out
model          no caching  cache written  cache read
gpt-6-astra       1.2500$        1.5000$     0.3500$
gpt-6-sol         0.2500$        0.3000$     0.0700$
gpt-6-luna        0.0125$        0.0150$     0.0035$
ok    Astra: $1.25 plain, $1.50 when the prompt is written to the cache, $0.35 when it is read from it
ok    Sol is a fifth of Astra and Luna a hundredth, on every line
caching stops paying when more than 78.3% of prompt tokens are writes; the same for all three models
ok    the break-even share of writes is 78.3% for every model
ok    200,000 tokens on Sol, written once and read once, cost $0.54; sent twice without caching they cost $0.80

Two consequences follow. A prompt that is written to the cache and never read again costs 25% more than if caching had not been involved. For a one-off request with a large prompt, the API’s explicit cache mode with no breakpoint set avoids the write. And as soon as a prompt is read once, caching is ahead: written once and read once costs 1.35 times the input price against 2. Caching only loses when more than 78% of prompt tokens are writes, which an agent loop is nowhere near.

== 2. The step at 272,000 input tokens
gpt-6-sol, 272,000 tokens in (262,000 read, 10,000 written), 4,000 out   $0.1174
gpt-6-sol, 273,000 tokens in (263,000 read, 10,000 written), 4,000 out   $0.2152
ok    one thousand more tokens of context takes the request from $0.1174 to $0.2152

The second rule is a step, not a slope. A thousand tokens of extra context nearly doubles the price of that request and of every later request in the session.

What an agent session costs

An agent loop sends the whole conversation with every step: the instructions and tool definitions, then every tool call and result so far. The sample models that as a fixed base and a context that grows by a constant amount per step. With caching, each step reads what the previous step sent and writes what is new.

    history = 0
    cached = 0
    result: list[Turn] = []
    for number in range(1, turns + 1):
        history += added_per_turn
        compacted = False
        extra = 0.0
        if compact_at is not None and base + history > compact_at:
            # The summary is itself a request. Codex sends it without its tool declarations, so it does not begin
            # like the requests before it and cannot be read from the cache: the whole conversation is new input.
            so_far = base + history - added_per_turn
            extra = prices.request(model, 0 if caching else so_far, 0, so_far if caching else 0, summary)
            history = summary + added_per_turn
            cached = min(cached, base)
            compacted = True
        context = base + history
        if caching and context >= prices.cache_minimum:
            read, written, uncached = cached, context - cached, 0
            cached = context
        else:
            read, written, uncached = 0, 0, context
        result.append(Turn(number, context, read, written, extra + prices.request(model, uncached, read, written, output_per_turn), compacted))
        history += output_per_turn   # the model's own output is part of the next request
    return Session(result)

The session used here has a 30,000-token base and 60 steps, each adding 5,000 tokens of tool output and 1,000 tokens of the model’s own output. Those numbers are assumptions, chosen to resemble a long working session; change them in the sample to match what your own usage reports.

== 3. An agent session: 30,000-token base, 60 steps, 5,000 tokens of tool output and 1,000 of output per step
model          no caching    cached  cached, compact at 240,000  largest context  steps over 272,000
gpt-6-astra       197.10$    28.71$                      19.66$          389,000                  20
gpt-6-sol          39.42$     5.74$                       3.93$          389,000                  20
gpt-6-luna          1.97$     0.29$                       0.20$          389,000                  20
ok    the context grows by 6,000 tokens a step: 35,000 at step 1 and 389,000 at step 60
ok    step 2 reads the 35,000 tokens step 1 sent and writes the 6,000 that are new
ok    step 1 on Sol costs 35,000 written tokens and 1,000 of output: $0.0975
ok    the first step over 272,000 tokens is step 41, and it costs about twice step 40
ok    compacting at 240,000 keeps every request under the step and happens once in 60 steps
ok    for each model: caching beats no caching, and compaction beats running through the step
Bar charts of a modelled 60-step agent session on GPT-6 Sol with and without caching and compaction, and of one feature routed across Astra, Sol and Luna in five ways
A modelled 60-step session on Sol, and one feature routed five ways. The token counts are assumptions.

Three things stand out.

  • Caching is most of the bill. The same session costs $39.42 on Sol with no caching and $5.74 with it. An agent loop is the best case for a prompt cache, because each request repeats the one before. Anything that breaks the prefix, such as a tool list that changes between steps or a timestamp near the top, moves the session back toward the first figure.
  • The step arrives late and stays. The context passes 272,000 tokens at step 41, and the last twenty steps each cost about double. They are a third of the steps and well over half of the cached session’s cost.
  • Compaction pays for itself. Summarising the history once the context passes 240,000 tokens keeps every request under the step. The summary is charged as a request of its own, at the uncached rate for reasons the run below makes clear, and what follows it has to be written to the cache again. The session still falls from $5.74 to $3.93.

The proportions are the same for all three models, because Sol’s prices are exactly a fifth of Astra’s and Luna’s a hundredth. The same session is $28.71 on Astra and 29 cents on Luna.

⚠️
WHAT THE MODEL LEAVES OUT

Compaction loses detail, and a session that forgets something it needed will spend steps finding it again; the sample prices the summary and not that. It also assumes steps follow each other within the cache lifetime, which starts at 30 minutes and is renewed by each read. A session left overnight starts cold and writes everything again. And it assumes the same number of tokens whichever model runs a step.

Routing one piece of work

To compare routings, take one feature as a planning session of 10 steps, six worker sessions of 25 steps and a review of 5 steps over a large diff, and price it with each part on a chosen model.

def feature(planner: str, worker: str, reviewer: str) -> float:
    return (agent_session(prices, planner, **plan).cost + 6 * agent_session(prices, worker, **work).cost
            + agent_session(prices, reviewer, **review).cost)
== 4. One piece of work split across models
everything on Astra                    $  40.76
everything on Sol                      $   8.15
Sol plans, Luna works, Astra reviews   $   3.38
Sol plans and reviews, Luna works      $   1.33
everything on Luna                     $   0.41
ok    all-Sol is a fifth of all-Astra, and all-Luna a hundredth
ok    in the mixed route the Astra review is 76% of the bill, more than the planning and the six workers together

Sending the workers to Luna and keeping Sol for the plan takes the feature from $8.15 to between $1.33 and $3.38, depending on who reviews. (That $3.38 is the mixed route, not the compacted session above.) In the mixed route the Astra review is three quarters of the total. That is the line to look at before deciding that every change deserves the most capable reviewer: it may be right for a change to a payment path or a clinical rule, and wasteful for a dependency bump.

These are token prices. A worker model that takes twice as many steps, or produces a change that fails review and has to be redone, costs more than the table shows, and the engineer’s time costs more than any of it. The routing is a hypothesis to test on your own tasks, with the cheap arithmetic done first.

A Codex configuration with a model per role

Codex reads ~/.codex/config.toml. The file below gives the main session to Sol, plans at a higher reasoning effort, sends subagents to Luna, reviews with Astra, and compacts before the price step.

model = "gpt-6-sol"                     # everyday interactive and agentic coding
model_reasoning_effort = "medium"
plan_mode_reasoning_effort = "high"     # think harder while planning, before any file is touched
review_model = "gpt-6-astra"            # /review gets the most capable model

sandbox_mode = "workspace-write"
approval_policy = "on-request"
approvals_reviewer = "user"             # escalations go to a person, not to the automatic reviewer

# Compact the conversation before a request can cross 272,000 input tokens, where the price doubles.
model_auto_compact_token_limit = 240000

[agents]
default_subagent_model = "gpt-6-luna"   # spawned workers do focused, high-volume steps
default_subagent_reasoning_effort = "low"
max_concurrent_threads_per_session = 4

Profiles cover the cases where the default is wrong. In this version of the CLI a profile is a separate file beside the main one, named after the profile, and selected with --profile. Two of the three:

# ~/.codex/deep.config.toml: codex --profile deep, for hard design and debugging sessions.
model = "gpt-6-astra"
model_reasoning_effort = "high"
# ~/.codex/ci.config.toml: codex --profile ci, for unattended runs in a pipeline.
model = "gpt-6-sol"
model_reasoning_effort = "low"
sandbox_mode = "read-only"
approval_policy = "never"
service_tier = "flex"

The first draft of this configuration put the profiles in [profiles.deep] tables inside config.toml. The JSON schema in the Codex repository accepts that, and validation against the schema passed. The CLI does not:

Error loading config.toml: --profile `deep` cannot be used while <temp>/home-legacy/config.toml contains legacy `profile = "deep"` or `[profiles.deep]` config; move those settings into <temp>/home-legacy/deep.config.toml and remove the legacy profile selector/table.
⚠️
A SCHEMA CHECK IS NOT A RUN

The schema still describes the older profile tables, so a file can validate and then be refused. Validate configuration by loading it in the version of the tool you deploy. The sample keeps the schema check, records that the schema accepts the legacy form, and relies on the run below for the rest.

What Codex sends: a run against a local stand-in

To see what those settings do, the sample runs Codex CLI 0.157.1 in a pipeline with a model provider that points at a small server on the same machine. The server speaks the streaming Responses API and plays a script: run this shell command, then this one, then say done. It records every request the CLI makes and reports token usage counted from the request itself. Codex executes the scripted commands in its read-only sandbox in a throwaway repository. No model is involved, and the key the CLI is given is not a real one.

  # The example configuration from the article, plus a provider that points at the stand-in.
  { printf 'model_provider = "standin"\n'; cat "$here/../codex/config.toml"
    printf '\n[model_providers.standin]\nname = "Local stand-in"\nbase_url = "http://127.0.0.1:%s/v1"\nenv_key = "STANDIN_KEY"\nwire_api = "responses"\n' "$(cat "$work/port")"; } > "$home/config.toml"
%%{init: {'theme':'base','themeVariables':{'primaryColor':'#FFF3E0','primaryTextColor':'#232F3E','primaryBorderColor':'#FF9900','lineColor':'#232F3E','signalColor':'#0073BB','signalTextColor':'#0F172A','actorBkg':'#FFF3E0','actorBorder':'#FF9900','actorTextColor':'#232F3E','noteBkgColor':'#FFF8E7','noteBorderColor':'#FF9900','noteTextColor':'#232F3E'}}}%%
sequenceDiagram
    participant C as Codex CLI
    participant S as Local stand-in
    participant X as Sandbox
    C->>S: POST /v1/responses (stream)
    S-->>C: Scripted step: run "cat NOTES.md"
    C->>X: Run the command, read-only
    X-->>C: Output
    C->>S: Same request plus the call and its output
    S-->>C: Next scripted step, or "done"

Seven scenarios were run: the default configuration over six shell steps, the two profiles, a spawned subagent, a review, the same six steps with the compaction limit lowered to 20,000 tokens, and the legacy profile table. These are the six-step run’s requests. The columns are the request number, the agent, the model and effort the CLI asked for, what the stand-in replied with, the tokens taken by tool declarations, the number of items in the request, its total tokens, and whether every earlier item was sent again unchanged.

      1   main    gpt-6-sol  medium    shell           5,225            7         11,081                        -
      2   main    gpt-6-sol  medium    shell           5,225            9         11,258                     True
      3   main    gpt-6-sol  medium    shell           5,225           11         15,866                     True
      4   main    gpt-6-sol  medium    shell           5,225           13         20,476                     True
      5   main    gpt-6-sol  medium    shell           5,225           15         25,088                     True
      6   main    gpt-6-sol  medium    shell           5,225           17         29,694                     True
      7   main    gpt-6-sol  medium  message           5,225           19         34,304                     True
== checks on what the CLI sent
ok    default configuration: seven requests, all to gpt-6-sol at medium effort
ok    every request repeats the earlier items unchanged and adds exactly two: the call and its output
ok    the tool declarations and the cache key are identical on all seven
ok    responses are not stored, and tools are declared in an input item, not a top-level field
ok    --profile deep sends gpt-6-astra at high effort
ok    --profile ci sends gpt-6-sol at low effort on the flex tier
ok    a spawned subagent's request goes to gpt-6-luna at low effort, as agents.default_subagent_model says
      the subagent's first request carries 14,836 tokens before it has done anything
ok    codex exec review sends gpt-6-astra, the review_model
ok    with the limit at 20,000 tokens the CLI asks for a summary as soon as a reply reports more than that
ok    the summary request carries no tool declarations, so it does not start like the request before it
ok    the request after it is smaller than the one before the summary and begins with the same tool declarations and main instructions as the first request
      before 20,476 tokens, summary request 19,988, after 11,240
      after: the first 2 items (9,179 tokens) are byte-identical to the first request's; the other 6 are new or re-created
      after: additional_tools:developer 5,271, message:developer 3,908, message:developer 908, message:developer 623, message:developer 108, message:user 184, message:user 67, message:user 169
ok    a [profiles.deep] table in config.toml makes --profile deep fail with a message that calls it legacy

12 of 12 checks passed

What the run shows, in the order it matters to the cost model above:

  • The loop is append-only. Each request repeats every earlier item byte for byte and adds two, the tool call and its output, with the same cache key throughout. That is the shape prompt caching rewards, and it is what the session model assumed.
  • The fixed overhead is about 11,000 tokens before the agent has read anything: 5,200 of tool declarations and the rest instructions and environment. That is for an empty configuration. Project instructions, skills and MCP servers add to it, and every subagent pays its own: the spawned one started at 14,836 tokens.
  • The routing settings do what they say. The default sends gpt-6-sol at medium effort; --profile deep sends gpt-6-astra at high; --profile ci sends Sol at low effort on the flex tier; a subagent spawned without a model goes to gpt-6-luna at low effort; codex exec review goes to gpt-6-astra.
  • Compaction is a separate, different request. When a reply reported more tokens than the limit, the CLI sent the whole conversation again with an empty tool list and asked for a summary. Because that request does not begin like the ones before it, the prefix rule says it cannot be read from the cache, which is why the cost model charges it in full. The next request was 11,240 tokens against 20,476 before; its first two items, 9,179 tokens of tool declarations and main instructions, were identical to the first request’s, and the rest were new or re-created.
  • Tools are not where older clients put them. With these models the CLI declares tools in an input item, not in the top-level tools field, and offers one freeform tool that takes JavaScript and reaches the shell through it. A proxy or gateway that inspects the tools field to enforce policy will see nothing.

Codex prints its own caution when it compacts:

context compacted
warning: Heads up: Long threads and multiple compactions can cause the model to be less accurate. Start a new thread when possible to keep threads small and targeted.

The limits of this run are the limits of a script. The stand-in’s token counts are its own, made with the o200k_base encoding, and stand in for what the service would report. Whether the service’s cache treats re-created items with new identifiers as a changed prefix cannot be seen from the client side. And a scripted reply says nothing about what a real model would choose to do.

Calling the models from your own code

A team building its own agent on the Responses API has the same levers, without Codex to pull them.

LeverWhat to do
Cache modeLeave the default for loops. For one-off requests with a large prompt, use explicit mode with no breakpoint to avoid a write that will never be read
Prefix stabilityKeep instructions and tool definitions identical between steps. Restrict tools with tool_choice instead of removing them from the list
Reasoning effortOn Astra, change effort mid-conversation by appending a configuration_update item instead of changing the top-level setting, which would break the cached prefix
Context sizeCompact before 272,000 input tokens. Alert on any request that crosses it
MeasurementLog cached_tokens and cache_write_tokens from every response. Prompt Cache Diagnostics explains misses
Processing tierFlex or Batch at half price for work nobody is waiting on; Fast at double only where latency is worth it

Security and governance

ConcernWhat applies
Capability classificationOpenAI classifies Astra as reaching its Critical cybersecurity threshold. At launch it assists with secure code review and patching and refuses to write proof-of-concept exploits (reported by DataCamp from the launch post)
Safety pausesAn extra safety check can pause work. In Codex the user is asked to review; in the API the task stops. A pipeline that calls Astra must treat a stopped task as an expected outcome and not retry blindly
Who approvesapprovals_reviewer decides whether escalations go to a person or to Codex’s automatic reviewer. The sample keeps a person. Decide this per repository, and keep it a person for anything regulated
Sandboxworkspace-write for interactive work, read-only with no approvals for unattended runs; the run above executed its commands under read-only. Codex 0.156.0 closed several sandbox isolation gaps, which is a reason to stay current
SubagentsFan-out multiplies spend and actions, and each subagent starts with its own overhead. Cap concurrent threads, and give workers the narrowest tools
Gateways and proxiesCodex declares tools inside the request input for these models. A control that reads only the top-level tools field no longer sees them
EnablementIn ChatGPT Enterprise an administrator enables the models. In Copilot Business and Enterprise, new models are on by default unless that default has been turned off; check which applies to you
Data residencyIn Foundry, EU Data Zone deployments are priced 20% above global and US Data Zone 10%. Choose the deployment type before the model
Generated changesUntrusted until reviewed and tested. A stronger review model is an extra check, not a replacement for the pull-request gates
Clinical and regulated codeKeep a named human reviewer on any change to decision logic. A model’s review does not discharge a clinical safety or change-control obligation

Cost

ItemFigureNote
Sol against AstraOne fifth, on every line of the price listLuna is one hundredth
A modelled 60-step session on Sol$39.42 uncached, $5.74 cached, $3.93 cached and compactedAssumed token counts
Fixed overhead per Codex sessionAbout 11,000 tokens per request before any work; 14,800 for a subagentObserved in the run, empty configuration
The price stepA request at 273,000 input tokens costs 83% more than one at 272,000$0.2152 against $0.1174 on Sol
One feature, all on Sol$8.15Plan, six workers, review
The same, Luna workers$1.33 with a Sol review, $3.38 with an Astra reviewIf the workers succeed
Flex or BatchHalf of the aboveFor unattended work
EU Data Zone in Foundry20% moreFrom Microsoft’s price table

Seat-based plans hide these figures behind usage limits, and they still apply: a session that crosses the step or loses its cache uses the allowance faster.

Decision framework

SituationChooseReason
Default for a team starting with GPT-6 in CodexSol for the main sessionOpenAI and GitHub both position it for agentic coding, at a fifth of Astra
Delegated, narrow steps: search, mechanical edits, summariesLuna for subagentsA hundredth of the price; measure the failure rate before relying on it
Review of high-risk changesAstra as review_modelAn independent, stronger check where a miss is expensive
Review of routine changesSolThe Astra review was 76% of the modelled bill
Hard design or debugging sessionAstra through a profilePay for it when the problem needs it, not by default
Unattended pipeline runsSol, low effort, read-only sandbox, FlexCheap, bounded, and nothing to approve
Any long sessionCompaction below 272,000 tokensThe step doubles the price of everything after it. Each compaction is a full-price request, so not too low either
A decision that depends on qualityYour own tasks, run on each modelThe published numbers are the vendor’s, on other work

Key takeaways

  • GPT-6 Astra, Sol and Luna share a 1,050,000-token window and differ in price by exactly 5 and 100 times: $10, $2 and $0.10 per million input tokens, $50, $10 and $0.50 for output.
  • Two pricing rules are new. Cache writes are billed at 1.25 times the input price, and any request over 272,000 input tokens is billed at double for input and one and a half times for output, on the whole request.
  • In a modelled 60-step session on Sol, caching took the cost from $39.42 to $5.74 and compaction below the step took it to $3.93. Protect the cached prefix and compact early.
  • Codex has a separate setting for the main model, planning effort, subagents and review. Run against a local stand-in, CLI 0.157.1 sent Sol for the main session, Luna for a spawned subagent and Astra for a review, and refused a profile written the older way that the schema still accepts.
  • Routing workers to Luna cut the modelled cost of a feature by 59 to 84%, and one Astra review cost more than everything else together. Decide which changes earn that review.

If you have run the same tasks through Sol and Luna as Codex subagents, I would like to know how often Luna’s work survived review. Leave a comment.

📝
HOW THIS WAS CHECKED

The facts in the tables were read from OpenAI’s API changelog and model pages, Microsoft’s Foundry announcement, GitHub’s changelog, the Codex release notes for 0.153.0 and 0.156.0 and Microsoft’s Codex documentation; benchmark and safety statements attributed to OpenAI’s launch posts were read in press coverage, linked beside them, because the posts themselves could not be retrieved. Everything else ran in GitHub Actions. The cost model passed 21 checks against hand calculation and the configuration schema at tag rust-v0.157.1. Codex CLI 0.157.1, installed from npm, was then run in seven scenarios against a local stand-in for the Responses API, and 12 checks on the recorded requests passed: models, efforts and service tier per setting, the append-only loop, the subagent, the review, compaction at a lowered limit and the refusal of the legacy profile table. The stand-in plays a script and counts tokens itself; the scripted commands were run by Codex in its read-only sandbox in a throwaway repository. Not run: any request to a GPT-6 model, the interactive interface, plan mode, MCP servers, and the profiles’ behaviour beyond the first requests. The session shapes in the cost model are assumptions. Nothing here measures code quality, task success, latency or the service’s real cache behaviour. The run is here.

Glossary

  • Codex— OpenAI’s coding agent: a CLI, an IDE extension, a desktop app and a cloud service that run a model in a loop with tools.
  • Agent loop— Repeated requests in which the model calls a tool, receives the result and decides the next step, carrying the conversation each time.
  • Subagent— A separate agent session started by the main one to do a delegated part of the work.
  • Reasoning effort— A setting that controls how much the model reasons before answering; more effort means more output tokens.
  • Prompt cache— The provider’s store of recently processed prompt prefixes. Reading from it is cheap; on these models, writing to it costs more than ordinary input.
  • Cache breakpoint— The point in a prompt up to which the content is written to, or read from, the cache.
  • Compaction— Replacing the earlier part of a long conversation with a summary so that it fits and costs less.
  • Long-context pricing— Higher rates applied to a whole request when its input exceeds a threshold, here 272,000 tokens.
  • Profile— A named set of Codex settings selected for one run with a command-line option.
  • Flex and Batch— Slower processing options at half the standard price.
  • OSWorld, Terminal-Bench, DeepSWE— Benchmarks of computer use, of agent work in a terminal and of software-engineering tasks.

References & Further Reading


Discover more from C4: Container, Code, Cloud & Context

Subscribe to get the latest posts sent to your email.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.