cd /news/ai-agents/subagent-guidance-for-codex-copy-the… · home › topics › ai-agents › article
[ARTICLE · art-143583] src=gist.github.com ↗ pub= topic=ai-agents verified=true sentiment=· neutral

Subagent guidance for Codex (copy the raw contents into your ~/.codex/AGENTS.md)

A developer published guidance for configuring Codex subagents, instructing that both the model and reasoning effort be set explicitly at spawn time rather than inherited from the parent. The flow maps task characteristics to model/effort pairs — Luna (gpt-6-luna) for mechanical, synthesis, and ordinary bounded work, and Sol (gpt-6.1-sol) for complex tasks requiring conflicting-evidence decisions or deep correctness reasoning — with Luna/high as the configured default and forks disabled via fork_turns="none".

by read2 min views1 publishedOct 1, 2026

Use this guidance whenever launching any subagent, regardless of role.

Before every launch, follow the flow below to choose the model and reasoning effort together. Set both explicitly in the spawn call. Apply the flow again for each new assignment; do not automatically reuse a previous selection.

Keep the user-selected lead model unchanged. Luna means gpt-6-luna; Sol means gpt-6.1-sol. The configured default is Luna/high.

Follow this flow before spawning. Choose the resulting pair directly; these are classification questions, not a sequence of trial runs.

flowchart TD
    Task[Assess the assigned subtask] --> Complex{"Complex or ambiguous task?<br/>Architecture, interacting modules,<br/>difficult debugging, broad or risky review"}
    Complex -->|No| Mechanical{"Purely mechanical?<br/>Exact checks, simple extraction,<br/>fine-grained edits with no judgment"}
    Mechanical -->|Yes| LunaLow[Luna / low]
    Mechanical -->|No| Synthesis{"Substantial synthesis with clear constraints?<br/>Several sources or apps"}
    Synthesis -->|Yes| LunaXhigh[Luna / xhigh]
    Synthesis -->|No| LunaHigh["Luna / high<br/>Ordinary bounded work"]
    Complex -->|Yes| Demanding{"Decisions from conflicting evidence,<br/>or demanding deliverables needing<br/>polish and consistency across components?"}
    Demanding -->|Yes| SolXhigh[Sol / xhigh]
    Demanding -->|No| Deep{"Deep correctness reasoning?<br/>Competing hypotheses, state, concurrency,<br/>lifecycle, subtle security or data integrity"}
    Deep -->|Yes| SolHigh[Sol / high]
    Deep -->|No| SolMedium["Sol / medium<br/>Normal starting point for complex work"]

Before spawning, give the subagent a self-contained brief and use fork_turns="none". Set both model and reasoning_effort explicitly to the selected pair. Full-history forks inherit the parent model and effort and cannot accept spawn-time overrides. Check custom agent files first: their model and reasoning settings take precedence. State the task-specific reason for choosing a pair other than Luna/high.

If work stalls, identify the cause before changing the pair. Missing requirements, evidence, or access, tool failures, waiting for CI, and routine test repairs call for better information or execution. For a demonstrated reasoning limitation, return the unresolved problem and evidence to the lead; the lead reassesses this flow and explains why the new pair should help.

Max and ultra are exceptional choices for a bounded problem. Reassess the model and problem framing first, and explain why xhigh is insufficient. Repository size, elapsed time, or the lead's setting alone do not justify an increase. Long or repetitive work with a settled contract can stay on Luna. Reassess each new assignment rather than carrying an elevated setting forward.

Use the OpenAI model-selection guidance as task-specific starting points alongside this local flow.

── more in #ai-agents 4 stories · sorted by recency
── more on @codex 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/subagent-guidance-fo…] indexed:0 read:2min 2026-10-01 · —