Subagent Custom Agent Model/Reasoning Config Not being Respected

Resolved 💬 14 comments Opened Mar 14, 2026 by am-will Closed Mar 16, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

0.114.0

What subscription do you have?

Pro

Which model were you using?

Gpt 5.3

What platform is your computer?

ubuntu

What terminal emulator and version are you using (if applicable)?

ghostty

What issue are you seeing?

I am testing custom subagent roles, and according to the rust logs, its not using the model I configured. I tested in 0.115.0 alpha as well and it also doesn't work.

So if you set model to 5.3 spark, or 5.1 mini, instead of running that model from that agent.toml files, it will just inherit the parent's model (5.3 in this case).

Rust log confirmed that my Spark and Mini agents both ran with GPT 5.3 Medium (the current model I was using) despite having them configured.

spark.toml
model = "gpt-5.3-codex-spark"
model_reasoning_effort = "high"

The custom agent roles are available and callable in Codex, so they are configured correctly as far as I'm aware, and Codex will call them, but the model is overridden.

What steps can reproduce the bug?

Uploaded thread: 019cea5c-f813-7582-880f-2e57c89c37b9

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

14 Comments

github-actions[bot] contributor · 4 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #13849
  • #13204

Powered by Codex Action

am-will · 4 months ago

@jif-oai tagging because I know you are the one who created this feature. tysm

UntaDotMy · 4 months ago
@jif-oai tagging because I know you are the one who created this feature. tysm

try create it on agents folder and agent-profile, currently on my workflow , the subagent using the correct model as given to them, if you want to see , you can check my repo about codex_skills i do

am-will · 4 months ago
> @jif-oai tagging because I know you are the one who created this feature. tysm try create it on agents folder and agent-profile, currently on my workflow , the subagent using the correct model as given to them, if you want to see , you can check my repo about codex_skills i do

they are in the agents folder with an agent profile. you should check the rust logs to make sure. they used to work, but now they are not using the appropriate model.

UntaDotMy · 4 months ago
> > @jif-oai tagging because I know you are the one who created this feature. tysm > > > try create it on agents folder and agent-profile, currently on my workflow , the subagent using the correct model as given to them, if you want to see , you can check my repo about codex_skills i do they are in the agents folder with an agent profile. you should check the rust logs to make sure. they used to work, but now they are not using the appropriate model.

as tested on my end , it work very well, i try using spark model for memory update, working okay , using another model also can work okay, i dont have this issue on my end after add it on agents folder and agent profile , make sure on config.toml you add the route for it. example :

[agents.git-expert]
description = "Analysis-first Git workflow and state-safe collaboration guidance"
config_file = "agents/git-expert.toml"

am-will · 4 months ago

i can assure you the file is correct. the agents work. they just dont respect the model and reasoning level.

ThinkOffApp · 4 months ago

We run 9 agents with GPT, Opus, Gemini and lower grade models like Kimi and Qwen with per-agent model configuration via OpenClaw. Getting model assignment right for subagents is essential for cost and capability matching.

In our setup, each agent has its own config file that specifies its model, and the gateway respects that regardless of what the orchestrator uses. The key design decision was: model selection is an agent property, not inherited from the parent.

If this is a Codex-specific inheritance bug, the fix should ensure that agent role configs (like spark.toml) take precedence over the spawning context. Model choice is usually intentional. You pick a lighter model for routine tasks and a heavier one for complex reasoning. Having the parent override that defeats the purpose.

am-will · 4 months ago
We run 9 agents with GPT, Opus, Gemini and lower grade models like Kimi and Qwen with per-agent model configuration via OpenClaw. Getting model assignment right for subagents is essential for cost and capability matching. In our setup, each agent has its own config file that specifies its model, and the gateway respects that regardless of what the orchestrator uses. The key design decision was: model selection is an agent property, not inherited from the parent. If this is a Codex-specific inheritance bug, the fix should ensure that agent role configs (like spark.toml) take precedence over the spawning context. Model choice is usually intentional. You pick a lighter model for routine tasks and a heavier one for complex reasoning. Having the parent override that defeats the purpose.

Yeah so this used to work just fine. But in one of the recent updates, it broke, so the agents launch but they just inherit instead of override.

Config is correct.

<img width="1072" height="297" alt="Image" src="https://github.com/user-attachments/assets/9bd198b6-0b6c-4c9a-9031-8c67ebe08316" />

am-will · 4 months ago

In fact, Spark doesn't work at all in the new 115 update you will want to fix this before launching it live.

<img width="1349" height="745" alt="Image" src="https://github.com/user-attachments/assets/375e040c-11c6-48a2-aa82-1c227192614a" />

jif-oai contributor · 4 months ago

I was OOO, sorry for the delay. I saw some PRs were pushed here. I'll take a look and fix all the issues

jif-oai contributor · 4 months ago

I tried on my side and everything is working as expected...
@am-will can you send me your full config.toml, the agent file and confirm the command you use to start Codex?

jif-oai contributor · 4 months ago

Oh maybe you're using a project profile? If so I have the issue. Will fix in the next release

am-will · 4 months ago
I was OOO, sorry for the delay. I saw some PRs were pushed here. I'll take a look and fix all the issues

No worries! Hope you had a great holiday. The only profile I'm using is yolo but its general not project specific.

Upon testing, i suspect you actually did fix it, because itstead of running the wrong model/reasoning, i'm hitting this error.

Which is the same error I hit with ALL spark instances.

019cf7ee-9367-73b0-8ad2-e25e4ece197e

{
  "type": "error",
  "error": {
    "type": "invalid_request_error",
    "code": "unsupported_parameter",
    "message": "Unsupported parameter: 'reasoning.summary' is not supported with the 'gpt-5.3-codex-spark' model.",
    "param": "reasoning.summary"
  },
  "status": 400
}

So i suspect you fixed it (thanks!) but there's still an odd issue with spark that happens whether i'm using a subagent or not.

am-will · 4 months ago

Fixed.

This was the problem

model_reasoning_summary = "detailed"

<img width="1821" height="767" alt="Image" src="https://github.com/user-attachments/assets/cd7dcaea-6c69-4413-9c73-2142f7db70c6" />

Also your fix worked!

thanks @jif-oai