Adding task-complexity-to-model routing rules to Agent.md enables the primary Codex agent to dynamically assign sub-tasks to Sol, Terra, or Luna based on complexity when tasks are decomposable, while avoiding unnecessary sub-agent invocation for simple tasks.
Suitable tasks: Codex Multi-Agent V2, decomposable coding or analytical tasks, and agent orchestration requiring quota/token usage control.
Unsuitable tasks: Non-decomposable sequential tasks, tasks where all steps must share real-time context, and high-risk write operations lacking automated or human verification.
Applicable model versions: GPT-5.6 Sol, GPT-5.6 Terra, and GPT-5.6 Luna; no specific snapshot was specified in the original post.
Applicable clients, agents, or APIs: Codex's Agent.md or root prompt; not intended as a general API system prompt.
Recommended reasoning effort and parameters: Determined dynamically by the primary agent based on sub-task complexity; the original post specifies no explicit effort parameters.
Add the following content to your project's Agent.md (verify the filename and supported model IDs according to your Codex version):
Sub-agents may be used when a task can be decomposed into two or more independent workflows.
The primary agent selects the model based on sub-task complexity:
- Complex planning, architecture, and critical decision-making: gpt-5.6-sol
- Routine analysis, coding, and execution: gpt-5.6-terra
- Well-defined, repetitive, search, scanning, and cleanup tasks: gpt-5.6-luna
Do not spawn sub-agents for simple tasks. Unless explicitly specified otherwise, the primary agent determines the sub-agent's model and reasoning effort.Place these rules in the project-level Agent.md or the corresponding root prompt that Codex reads.
Only allow delegation when two or more mutually independent workflows exist.
Have the primary agent evaluate task complexity before selecting the sub-agent model and reasoning effort.
Route complex planning and architecture to Sol, routine analysis and coding to Terra, and repetitive search or scanning to Luna.
Keep simple tasks on a single agent; ensure tests, code reviews, or manual confirmation remain in place for critical writes.
This is a community-shared routing rule rather than an official OpenAI default system prompt, and no public benchmark experiments on success rates or token quota efficiency were provided.
Model routing alone does not resolve permissions, sandboxing, concurrency, or output verification; these remain the responsibility of Codex configuration and project workflows.
Model IDs like gpt-5.6-*, Agent.md loading behavior, and multi-agent capabilities may change across Codex versions; verify against current client documentation before use.
GPT-5.6 Terra