post: Which Model Do Your Claude Code and Codex Subagents Actually Use?_□×

Which Model Do Your Claude Code and Codex Subagents Actually Use?

If I’m using Fable to work through a hard problem and hand a doc lookup to Claude Code’s built-in general-purpose agent, Fable handles the lookup too. The agent inherits the main session’s model by default. In my Claude Code test, four calls with one-line prompts used 40,202 to 43,133 tokens apiece. Three lookups at the low end of that range would use over 120,000 tokens.

I don’t want to burn through Astra or Fable tokens looking up a flag in the docs. Sonnet can handle that in Claude Code. In Codex, I can keep Astra in the main thread and hand the lookup to Luna.

Set the Claude Code default

Put this in ~/.claude/settings.json. If you’ve set CLAUDE_CONFIG_DIR, use the settings.json in that directory.

{
  "env": {
    "CLAUDE_CODE_SUBAGENT_MODEL": "sonnet"
  }
}

On Claude Code 2.1.251 and later, a general-purpose call with no model specified gets Sonnet with this setting. My dev and reviewer agents can still pin Opus in their files. I leave CLAUDE_CODE_SUBAGENT_MODEL_FORCE off so those pins work. Explore and Plan have their own model rules, so use general-purpose to check this default.

Check a Claude Code call

Ask Claude Code to spawn a general-purpose agent with no model override and have it reply with one word. Open the child’s JSONL transcript in the subagents folder under <config dir>/projects/<project>/<session>/. This command counts the assistant records for each model ID in that transcript.

jq -r 'select(.type=="assistant") | .message.model' "/path/to/subagent.jsonl" | sort | uniq -c

Look for a Sonnet model ID. If you see Fable, check which agent was called and whether the call supplied a model.

Set the Codex default

In Codex, put the lookup model and its reasoning effort under [agents] in ~/.codex/config.toml. If you already have an [agents] section, add the two settings there.

[agents]
default_subagent_model = "gpt-6-luna"
default_subagent_reasoning_effort = "low"

That lets me keep Astra in the main thread. A new subagent gets Luna at low effort unless the spawn request or its own agent file specifies something else. Without a subagent default or an override, the child inherits the parent’s model and effort.

For an agent that needs a different model, set model and model_reasoning_effort in its own TOML definition. In Codex those settings take precedence over the spawn request.

Check a Codex call

Start a new Codex CLI session in the project. Ask “Spawn a default subagent to tell me the first heading in README.md, then wait for its reply.” Open /subagents, select the child that did the lookup, and run /status in that thread. With the config above, you should see gpt-6-luna. If you check the main thread instead, you’ll see the model that handed off the work.

/status shows the model Codex selected. If you’re investigating a backend reroute in the app server, the model/rerouted event records the original and replacement models.

The one-line answer looks much the same whether Luna found the flag or Astra did. I want to know which one handled the first lookup before I hand it another dozen.

Sources

I’d appreciate a follow. You can subscribe with your email below. The emails go out once a week, or you can find me on Mastodon at @[email protected].

START
llbbl.exeprojects/posts/experiments/subscribe.dlg
© 2026v1.0.0