Bug Description
The model parameter in sessions_spawn and the agents.defaults.subagents.model config setting are not being applied to spawned sub-agents. Sub-agents always inherit the main agent's model regardless of configuration.
Steps to Reproduce
- Configure sub-agent default model in
clawdbot.json:
{
"agents": {
"defaults": {
"subagents": {
"model": {
"primary": "openai-codex/gpt-4o",
"fallbacks": ["openai/gpt-4o"]
}
}
}
}
}
- Spawn a sub-agent with explicit model override:
sessions_spawn(task="Test task", model="openai/gpt-4o")
-
Tool returns { "modelApplied": true }
-
Check the session transcript:
{"type":"model_change","provider":"anthropic","modelId":"claude-opus-4-5"}
Expected Behavior
Sub-agent should run on the specified model (openai/gpt-4o or openai-codex/gpt-4o).
Actual Behavior
Sub-agent runs on the main agent's model (anthropic/claude-opus-4-5) despite:
- Config setting
agents.defaults.subagents.model
- Explicit
model parameter in sessions_spawn
- Tool returning
modelApplied: true
Environment
- Clawdbot version: 2026.1.24-3
- OS: macOS (Darwin 25.2.0 arm64)
- Main agent model: anthropic/claude-opus-4-5
- Attempted sub-agent models: openai-codex/gpt-4o, openai/gpt-4o
Additional Context
Gateway logs show config is being detected and applied:
[reload] config change applied (dynamic reads: agents.defaults.subagents.model)
But the actual model used in sub-agent sessions is always the main agent's model.
Bug Description
The
modelparameter insessions_spawnand theagents.defaults.subagents.modelconfig setting are not being applied to spawned sub-agents. Sub-agents always inherit the main agent's model regardless of configuration.Steps to Reproduce
clawdbot.json:{ "agents": { "defaults": { "subagents": { "model": { "primary": "openai-codex/gpt-4o", "fallbacks": ["openai/gpt-4o"] } } } } }Tool returns
{ "modelApplied": true }Check the session transcript:
{"type":"model_change","provider":"anthropic","modelId":"claude-opus-4-5"}Expected Behavior
Sub-agent should run on the specified model (
openai/gpt-4ooropenai-codex/gpt-4o).Actual Behavior
Sub-agent runs on the main agent's model (
anthropic/claude-opus-4-5) despite:agents.defaults.subagents.modelmodelparameter insessions_spawnmodelApplied: trueEnvironment
Additional Context
Gateway logs show config is being detected and applied:
But the actual model used in sub-agent sessions is always the main agent's model.