How to Use GPT-5.6 Luna Max as a Codex Subagent

OpenAI just cut GPT-5.6 Luna’s API price by 80%. In its July 30 pricing update, OpenAI lists Luna at $0.20 per million input tokens and $1.20 per million output tokens. The lower Luna and Terra prices also reduce how much usage counts against paid Codex and ChatGPT Work subscriptions. Subscription prices and quota budgets themselves did not change. Read the official announcement.
The price cut matters because Luna is not only cheap. OpenAI describes it as a tool-using model for multi-step workflows, which is the same shape as many small coding tasks. My August 2 Distributed Radar snapshot gives this claim a concrete limit: Luna Max passed 61 of 112 repository tasks by majority vote. Sol xhigh passed 77. Luna was slower and less capable on this benchmark, but it still completed many bounded tasks.
That is why I opened Luna Max as a Codex subagent. Sol keeps the work that needs judgment: planning, decomposition, tradeoffs, integration, and final review. A GPT-5.6 Luna worker handles tightly specified execution at max effort in a separate agent thread, then returns the result to the parent.
The pattern is simple:
Sol: understand → plan → define acceptance criteria
↓
Luna Max: execute the bounded task → verify it
↓
Sol: review → integrate → make the final call

This does not create free compute. Codex subagents consume additional usage, and max gives a model more reasoning budget. The point is to route expensive judgment to Sol and repeatable execution to the cheaper model.
Why this division of labor makes sense
OpenAI’s current model selection guidance describes Luna as the efficient option for high-volume work and recommends reserving max for the hardest tasks. The distinction is between the model and the effort setting:
- the model determines the capability, latency, and price profile.
- the effort determines how much reasoning budget that model may spend.
Luna Max is a lower-cost worker model given enough room to think carefully about one well-defined assignment.
What the data actually supports
Here is the benchmark snapshot behind that capability claim. I froze the following Distributed Radar snapshot on August 2, 2026. Ability uses the majority result for each of 112 repository-level tasks. Time and cost use the latest valid run in each task cell.
| Configuration | Majority passes | Pass rate | Average time | Average cost |
|---|---|---|---|---|
| Luna Max | 61 / 112 | 54.5% | 31.5 min | $0.47 |
| GPT-5.5 xhigh | 72 / 112 | 64.3% | 23.7 min | $5.83 |
| Sol xhigh | 77 / 112 | 68.8% | 25.3 min | $6.56 |

The ability totals come from the public leaderboard. I calculated the averages from the public task table. One GPT-5.5 xhigh task lacked a valid latest-run time and cost, so its averages cover 111 tasks. The other rows cover all 112.
Luna Max is not the fastest or strongest option here. Its main advantage is cost: the average token-price-equivalent cost is about 92% lower than GPT-5.5 xhigh and about 93% lower than Sol xhigh.
The task-level comparison with GPT-5.5 xhigh is:
- both passed 58 tasks.
- Luna Max alone passed 3.
- GPT-5.5 xhigh alone passed 14.
- both failed 37.
GPT-5.5 xhigh is the better worker when avoiding a retry matters. But it is not a strict superset of Luna, and it costs about 12.4 times as much on this snapshot. Luna is cheap enough that letting it try first can still be economically rational when success is easy to verify.
A simple routing estimate illustrates the idea. If every task first ran on Luna and every Luna majority failure then ran on GPT-5.5 xhigh, the average token-price-equivalent cost would be:
$0.47 + (51 / 112 × $5.83) ≈ $3.12
That estimate is about 46% below sending every task directly to GPT-5.5 xhigh. It is not a measured mixed-agent result. It assumes reliable failure detection, ignores the parent agent’s planning and review usage, and trades lower cost for longer sequential runtime.
The data supports a narrower role for Luna Max: it can complete a meaningful share of real repository tasks at a small fraction of the equivalent cost. That justifies a tiered worker strategy:
Sol → plan, integrate, and review
Luna Max → cheap, bounded execution
GPT-5.5 xhigh → harder execution or Luna fallback
Those are standalone worker results. I later tested the theoretical union of two complementary cheap workers: DeepSeek V4 Flash Max plus Luna xhigh covered 78 of the same 112 tasks. On paper, that is one more than Sol xhigh, but only when a reliable verifier can identify the correct patch.
Step 1: make Max available
In the Codex desktop app, open:
Settings → Configuration → Model features
Turn on Max under Available reasoning efforts. The list is model-dependent. A model may still reject Max even when it appears in the menu.
Step 2: ask Sol to create the worker
You could write the TOML file by hand, but asking Sol to create and validate it is safer. Paste this prompt into Codex:
Create or update a custom Agent named luna_worker at:
~/.codex/agents/luna-worker.toml
Use:
model = "gpt-5.6-luna"
model_reasoning_effort = "max"
Add a clear description and developer_instructions. luna_worker should only
handle delegated tasks that are explicitly scoped, well bounded, and
independently completable. It must not change the parent task's objective or
expand scope on its own.
Preserve all other Codex configuration. Do not overwrite or delete unrelated
settings or files.
After creating the agent:
1. Check that the file format is compatible with my installed Codex version.
2. Show the exact diff produced by this change.
3. Validate that the configuration loads successfully.
4. For later subagent work in this thread, prefer luna_worker when the
delegated task fits its scope.
Check the config format against your installed version. Custom-agent fields can look plausible and still be invalid.
For example, the current format uses developer_instructions, not a literal instructions key. On my installation (Codex CLI 0.146.0), the resulting file is:
name = "luna_worker"
description = "Preferred worker for clearly scoped, well-bounded delegated tasks that can be completed independently without changing the parent task's objective or expanding its scope."
model = "gpt-5.6-luna"
model_reasoning_effort = "max"
developer_instructions = """
Handle only delegated tasks with explicit scope, clear boundaries, and
independently verifiable completion criteria.
Follow the parent agent's stated objective, constraints, and requested output
exactly.
Do not change the overall task goal, reinterpret the assignment into a broader
project, or expand the scope without explicit direction from the parent agent.
Do not modify unrelated files, configuration, or external state.
If the assignment is ambiguous, blocked, or requires a decision outside its
stated boundary, stop and report the specific issue to the parent agent instead
of guessing.
Complete the assigned work independently, verify the result in proportion to
its risk, and return a concise report covering the outcome, verification
performed, and any remaining limitations.
"""

Codex supports two useful locations for these files:
~/.codex/agents/*.tomlmakes an agent available from your personal Codex configuration..codex/agents/*.tomlkeeps an agent specific to one repository and lets the team version it with the project.
I use the personal location for a general-purpose Luna worker. For a repository with specialized rules, I would create a project-scoped agent instead.
The task boundary is the real optimization
The model setting is only half the setup. Luna works best when the parent hands it a small contract rather than a vague ambition.

A good delegation includes:
- the exact outcome,
- the files or directories in scope,
- constraints that must remain true,
- a test or other completion check,
- the form of the report expected back.
For example:
Use luna_worker to add table-driven tests for parseConfig in
src/config.test.ts. Do not change production code. Cover the five documented
input cases, run the targeted test file, and return the test result plus any
behavior that remains untested.
That is a worker task. “Improve the configuration system” is not.
Good Luna assignments include mechanical refactors within named files, test additions for known behavior, data transformations with a fixed schema, documentation from a fixed set of sources, isolated bug reproduction, and repetitive migrations with strong automated checks.
I would keep architecture decisions, ambiguous product requirements, irreversible cross-project changes, final security review, and any task where the worker must invent its own goal with Sol.
Separate context is a practical benefit
Subagents are often described as a way to run work in parallel. I find context separation just as valuable.
A test-writing job may generate thousands of lines of search output, compiler errors, and failed attempts. If all of that remains in the main conversation, Sol has to carry noisy execution history while making later design decisions. A separate Luna thread absorbs the mess and returns a compact result.
Shared state still needs care. Agents working in the same repository can touch the same files, so parallel assignments should have non-overlapping write scopes. Sol should own the integration point and review every returned change before accepting it.
Make the preference explicit
Creating luna_worker makes the agent available, but Codex will not necessarily choose it for every suitable delegation. When I want deterministic routing, I name it:
Plan this migration yourself. Keep architecture, integration, and final review
with Sol. Delegate the three independent file conversions to luna_worker, one
bounded assignment at a time, and verify each result before integration.
The final sentence in the setup prompt, “prefer luna_worker later in this thread,” sets an instruction for the current conversation. If I want the preference to persist for a repository, I add a short routing policy to that project’s AGENTS.md.
I do not use “always use Luna” as a rule. Delegation has overhead, and tiny tasks are often cheaper for the parent to complete directly. The worker is most useful when the task is substantial enough to justify a separate context but constrained enough to verify independently.
The cheapest model architecture is a mixed one
Running the cheapest model everywhere saves money but can increase retries. Running the most expensive model everywhere avoids some retries but wastes budget.
Custom agents let Codex use a better split:
- Sol spends its attention deciding what should be done and whether the result is acceptable.
- Luna Max spends its larger reasoning allowance executing a contract with clear edges.
- Tests and Sol’s review prevent a cheaper attempt from silently becoming an expensive mistake.
The pattern is simple: one strong planner directs cheaper workers while keeping ownership of the result.