Skip to main content
AI RADARAgents
445•08/03/2026, 10:15•2 min read

Setting Up Luna Max as a Sub-Agent in Codex

Setting Up Luna Max as a Sub-Agent in Codex
Executive TL;DR30s read

Explore how to set up Luna Max as a sub-agent in Codex to enhance performance and reduce task execution costs.

Setting Up Luna Max as a Sub-Agent in Codex

In the benchmark DeepSWE, Luna Max scored 67% compared to 73% for Sol Max. Meanwhile, the average cost of executing a single task was nearly 14 times lower: $0.61 versus $8.39. Therefore, it makes sense to delegate specific well-defined tasks to Luna.

Prompt:

PLAINTEXT
Create a custom agent luna_worker in the file ~/.codex/agents/luna-worker.toml.

Use the following settings:

model = "gpt-5.6-luna"
model_reasoning_effort = "max"

Add a description and instructions for performing clearly defined delegated tasks. Do not change the rest of the configuration. Check compatibility with the version of Codex I have installed, show the diff, and then use luna_worker for sub-agent tasks.

Alternative Option

Another option is to do without the custom agent file. Keep Sol in the main thread and ask her to launch a separate Luna Max thread for each task.

In Codex, a thread is a separate dialogue with its own context. Multiple threads can run in parallel, and Sol collects their results in the main thread.

Why it matters

Analysis

This is important as setting up sub-agents in Codex can significantly enhance operational efficiency and reduce task execution costs.

Discuss in community

Share your questions and insights with developers

Join Telegram
+5 Points
← Back to news feed

Related in Ecosystem

Practical guides, core terminology, and agent skills