openclaw - 💡(How to fix) Fix sessions_spawn model override does not take effect — child always uses default model [3 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#76196Fetched 2026-05-03 04:40:59
View on GitHub
Comments
3
Participants
3
Timeline
7
Reactions
2
Timeline (top)
commented ×3closed ×1mentioned ×1subscribed ×1

Code Example

sessions_spawn({
     task: "Reply with ONLY the exact string: GPT-OSS-120B. Nothing else.",
     model: "openai/gpt-oss-120b",
     runtime: "subagent",
     mode: "run",
     lightContext: true
   })
RAW_BUFFERClick to expand / collapse

Bug

sessions_spawn with model parameter reports modelApplied: true but the child session always uses the agent default model instead of the specified override.

Steps to Reproduce

  1. Set agent default model to e.g. zai/glm-5-turbo
  2. Spawn a subagent with a different model:
    sessions_spawn({
      task: "Reply with ONLY the exact string: GPT-OSS-120B. Nothing else.",
      model: "openai/gpt-oss-120b",
      runtime: "subagent",
      mode: "run",
      lightContext: true
    })
  3. Observe the response — the child identifies itself as the default model (GLM-5-Turbo), not gpt-oss-120b.

Expected Behavior

The child session should use openai/gpt-oss-120b (or whatever model is passed via model).

Actual Behavior

  • Tool response shows modelApplied: true
  • Child session runs on the agent default model (zai/glm-5-turbo)
  • Setting lightContext: true or false makes no difference
  • The model override appears completely ignored

Environment

  • OpenClaw: 2026.4.29 (a448042)
  • Node: v24.14.1
  • OS: WSL2 (Linux 6.6.87.2)
  • Gateway: systemd, loopback

Additional Notes

Tested 3 times with consistent results. The modelApplied: true in the spawn response is misleading — it suggests the override was accepted, but runtime behavior shows it was not applied.

extent analysis

TL;DR

The issue can likely be resolved by investigating the sessions_spawn function's handling of the model parameter and ensuring it correctly overrides the agent's default model.

Guidance

  • Verify that the model parameter is correctly passed to the sessions_spawn function and that it is not being overwritten or ignored within the function.
  • Check the documentation for the sessions_spawn function to see if there are any specific requirements or limitations for using the model parameter.
  • Test the sessions_spawn function with different models and configurations to see if the issue is specific to the openai/gpt-oss-120b model or if it is a more general problem.
  • Investigate the modelApplied: true response and determine why it is being returned even though the model override is not being applied.

Example

No code snippet is provided as the issue is more related to the functionality of the sessions_spawn function rather than a specific code error.

Notes

The issue may be related to a bug in the sessions_spawn function or a misconfiguration of the agent's default model. Further investigation is needed to determine the root cause of the problem.

Recommendation

Apply a workaround by manually setting the model for the child session after it is spawned, if possible, until the root cause of the issue can be determined and fixed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix sessions_spawn model override does not take effect — child always uses default model [3 comments, 3 participants]