Skip to content

Subagents

codexclaw lets you assign a model and prompt override to each subagent role, persisted in .codexclaw/subagents.json and exposed over MCP.

Three roles cover the common subagent workflow:

  • explorer — broad codebase investigation and research.
  • reviewer — adversarial audit and review.
  • executor — focused implementation.
Tool Purpose
subagents_get Read the per-role config: mode, model, promptOverride.
subagents_set Update one role’s config.
catalog_list List selectable models — Codex-native first, then ocx-backed when active.
{
"role": "reviewer", // explorer | reviewer | executor
"mode": "model", // "default" (main model) or "model" (needs a model id)
"model": "gpt-5.5", // required when mode is "model"
"promptOverride": "..." // optional per-role prompt, or null
}

Only role is required. mode: "default" uses the main model; mode: "model" requires a model id from catalog_list.

The GUI dashboard wraps these tools with model pickers and prompt editors so you can set roles without hand-editing JSON.

The pre-tool-use-attaching-skills hook wires into live spawn_agent calls on both surfaces, but it does not choose skills. Dispatchers explicitly name each required skill with preferred [$cxc-<name>](skill://<abs SKILL.md>) links or the plugin-native $codexclaw:cxc-<name> fallback. When the spawn message is plaintext, the hook normalizes known broken/bare mentions and inlines recognized SKILL.md bodies on V2-shaped spawns. Native ChatGPT-backend V2 gives the hook ciphertext, so both operations are no-ops there; when no body can be inlined, it appends a plaintext [CXC-SKILL-AFFORDANCE] block telling the child to self-load any $cxc-<folder> / $codexclaw:cxc-<folder> mention from <skillsDir>/<folder>/SKILL.md; fork inheritance remains a secondary channel. Its other reliable native V2 channels are the leaf guard and omitted configured model/reasoning_effort injection for non-full-history spawns. It never invents role baselines or inferred surface skills. Role config, resolver, and spawn-wrapper are all shipped (L9).