Codex Luna Agent Config
This skill configures an opt-in local role after a real Luna dispatch failure.
It is not part of ordinary subagent routing and does not authorize delegation.
Required Trigger
Proceed only when both conditions hold:
- A direct active-spawn invocation rejected
gpt-5.6-luna; report the tool,
attempted model/effort, and observed rejection before changing configuration.
- The user explicitly approves installing or configuring the
luna_max role.
If either condition is missing, stop. State that the role can be configured
after approval; do not read or edit global Codex configuration just to prepare.
Configure The Isolated Role
Resolve the active user-level Codex configuration root. It is normally
~/.codex; use a different root only when the runtime or an explicit test
fixture identifies one.
Discover role names before writing: inspect every [agents.*] declaration
in config.toml, resolve each referenced config_file, and inspect every
existing agents/*.toml file. A declared role normally uses its table key;
a standalone file uses its required name. Preserve unrelated settings,
roles, model defaults, and comments.
If exactly one source resolves to luna_max and it already pins Luna/max,
report it as configured and do not rewrite it. This includes a compatible
existing [agents.luna_max] declaration or a compatible standalone file.
Stop and show a conflict if multiple sources resolve to luna_max, the one
resolved role has incompatible behavior, or the intended
agents/luna-max.toml path already contains an unrecognized role. A single
compatible role at another path is already configured, not a conflict. Do
not replace another role or overwrite an ambiguous file without explicit
user direction.
Otherwise create one standalone agents/luna-max.toml. Do not add an
[agents.luna_max] declaration for a new role; this keeps config.toml
unchanged and avoids two definitions for the same role:
name = "luna_max"
description = "Use for clear, bounded subagent tasks that should run with GPT-5.6 Luna at max reasoning effort."
developer_instructions = "Use this role only for a clear, self-contained task. Stay within the requested scope, run the requested verification when possible, and report unresolved decisions instead of expanding the task."
model = "gpt-5.6-luna"
model_reasoning_effort = "max"
Do not set agents.default_subagent_model or
agents.default_subagent_reasoning_effort. This role is selected per child and
must not convert all subagents to Luna/max.
Verify And Use
Use a read-only Codex configuration load check, such as codex features list, and report its result.
Tell the user to start a new Codex task or restart the client so the active
spawn schema can expose agent_type: "luna_max".
For a self-contained worker, select the role and omit raw model fields:
// V1
spawn_agent({ agent_type: "luna_max", fork_context: false, message: handoff })
// V2
spawn_agent({ task_name: name, agent_type: "luna_max", fork_turns: "none", message: handoff })
The role avoids the raw model parameter path that previously rejected Luna.
It cannot grant model access: if role-based dispatch still fails, report the
server/runtime availability error and do not claim that configuration bypassed
it.
Never
- Do not load this skill from
codex-subagent-strategy before the user says
yes.
- Do not silently replace a rejected Luna worker with another model.
- Do not rewrite a conflicting
luna_max role.
- Do not test-spawn a child unless the user separately asks to delegate one.
1---2name: codex-luna-agent-config3description: Configure a local luna_max Codex agent only after a Luna spawn route was rejected and the user explicitly approves the fallback. Do not use for ordinary subagent routing.4---56# Codex Luna Agent Config78This skill configures an opt-in local role after a real Luna dispatch failure.9It is not part of ordinary subagent routing and does not authorize delegation.1011## Required Trigger1213Proceed only when both conditions hold:14151. A direct active-spawn invocation rejected `gpt-5.6-luna`; report the tool,16 attempted model/effort, and observed rejection before changing configuration.172. The user explicitly approves installing or configuring the `luna_max` role.1819If either condition is missing, stop. State that the role can be configured20after approval; do not read or edit global Codex configuration just to prepare.2122## Configure The Isolated Role23241. Resolve the active user-level Codex configuration root. It is normally25 `~/.codex`; use a different root only when the runtime or an explicit test26 fixture identifies one.272. Discover role names before writing: inspect every `[agents.*]` declaration28 in `config.toml`, resolve each referenced `config_file`, and inspect every29 existing `agents/*.toml` file. A declared role normally uses its table key;30 a standalone file uses its required `name`. Preserve unrelated settings,31 roles, model defaults, and comments.323. If exactly one source resolves to `luna_max` and it already pins Luna/max,33 report it as configured and do not rewrite it. This includes a compatible34 existing `[agents.luna_max]` declaration or a compatible standalone file.354. Stop and show a conflict if multiple sources resolve to `luna_max`, the one36 resolved role has incompatible behavior, or the intended37 `agents/luna-max.toml` path already contains an unrecognized role. A single38 compatible role at another path is already configured, not a conflict. Do39 not replace another role or overwrite an ambiguous file without explicit40 user direction.415. Otherwise create one standalone `agents/luna-max.toml`. Do not add an42 `[agents.luna_max]` declaration for a new role; this keeps `config.toml`43 unchanged and avoids two definitions for the same role:4445 ```toml46 name = "luna_max"47 description = "Use for clear, bounded subagent tasks that should run with GPT-5.6 Luna at max reasoning effort."48 developer_instructions = "Use this role only for a clear, self-contained task. Stay within the requested scope, run the requested verification when possible, and report unresolved decisions instead of expanding the task."49 model = "gpt-5.6-luna"50 model_reasoning_effort = "max"51 ```5253Do not set `agents.default_subagent_model` or54`agents.default_subagent_reasoning_effort`. This role is selected per child and55must not convert all subagents to Luna/max.5657## Verify And Use58591. Use a read-only Codex configuration load check, such as `codex features60 list`, and report its result.612. Tell the user to start a new Codex task or restart the client so the active62 spawn schema can expose `agent_type: "luna_max"`.633. For a self-contained worker, select the role and omit raw model fields:6465 ```text66 // V167 spawn_agent({ agent_type: "luna_max", fork_context: false, message: handoff })6869 // V270 spawn_agent({ task_name: name, agent_type: "luna_max", fork_turns: "none", message: handoff })71 ```7273The role avoids the raw `model` parameter path that previously rejected Luna.74It cannot grant model access: if role-based dispatch still fails, report the75server/runtime availability error and do not claim that configuration bypassed76it.7778## Never7980- Do not load this skill from `codex-subagent-strategy` before the user says81 yes.82- Do not silently replace a rejected Luna worker with another model.83- Do not rewrite a conflicting `luna_max` role.84- Do not test-spawn a child unless the user separately asks to delegate one.