Skip to content

Subagent Custom Agent Model/Reasoning Config Not being Respected #14671

Closed

Description

@am-will

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

Activity

  1. github-actions commented on Mar 14, 2026

    @github-actions
    Contributor
  2. am-will commented on Mar 14, 2026

    @am-will
    Author

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

  3. added
    agentIssues related to the core agent loop
    and removed
    CLIIssues related to the Codex CLI
    on Mar 14, 2026
  4. UntaDotMy commented on Mar 14, 2026

    @UntaDotMy

    @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

  5. am-will commented on Mar 14, 2026

    @am-will
    Author

    @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.

  6. UntaDotMy commented on Mar 14, 2026

    @UntaDotMy

    @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"

  7. am-will commented on Mar 14, 2026

    @am-will
    Author

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

  8. ThinkOffApp commented on Mar 14, 2026

    @ThinkOffApp

    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.

  9. am-will commented on Mar 14, 2026

    @am-will
    Author

    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.

    Image
  10. am-will commented on Mar 16, 2026

    @am-will
    Author

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

    Image
  11. jif-oai commented on Mar 16, 2026

    @jif-oai
    Contributor

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

  12. jif-oai commented on Mar 16, 2026

    @jif-oai
    Contributor

    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?

  13. 5 remaining items

  14. added
    subagentIssues involving subagents or multi-agent features
    and removed
    agentIssues related to the core agent loop
    on Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsubagentIssues involving subagents or multi-agent features

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions