Skip to content

[Bug]: isolated cron agentTurn jobs can ignore the target agent model and start on the global default model #47478

@zlyI2022

Description

@zlyI2022

Bug: isolated cron agentTurn jobs can ignore the target agent model and start on the global default model

Summary

In my setup, some isolated cron agentTurn jobs start directly on agents.defaults.model.primary when payload.model is omitted, instead of inheriting agents.list[agentId].model.primary.

Observed on:

  • OpenClaw 2026.3.12
  • OpenClaw 2026.3.13

Expected

Given:

{
  "agents": {
    "defaults": {
      "model": { "primary": "cliproxyapi/gpt-5.2" }
    },
    "list": [
      {
        "id": "briefing",
        "model": {
          "primary": "cliproxyapi/qwen3-local",
          "fallbacks": ["cliproxyapi/gpt-5.2"]
        }
      }
    ]
  }
}

and an isolated cron job:

{
  "agentId": "briefing",
  "sessionTarget": "isolated",
  "payload": {
    "kind": "agentTurn",
    "message": "test"
  }
}

I expect the run to start on cliproxyapi/qwen3-local.

Actual

The affected run starts immediately on cliproxyapi/gpt-5.2.

This does not look like a fallback after a failed primary call. The session transcript starts with model_change -> gpt-5.2.

Direct evidence

briefing should have started on qwen3-local, but the recorded cron run says gpt-5.2:

  • gateway.err.log:1588
  • briefing isolated session transcript line 2

profit-lab should have started on gemini-3.1-pro-high, but the recorded cron run says gpt-5.2:

  • gateway.err.log:1594
  • profit-lab isolated session transcript line 2

Workaround

Setting payload.model and payload.fallbacks explicitly in each cron job makes model selection deterministic.

Related issues

This may be related to existing cron model-resolution bugs such as #22246 and #33577, but this report is specifically about the case where payload.model is omitted and the run should inherit the target agent's configured model.

Questions

  1. Should isolated cron agentTurn jobs inherit agents.list[agentId].model.primary when payload.model is omitted?
  2. If yes, why can they start directly on agents.defaults.model.primary instead?
  3. If explicit payload.model is required by design, should the docs say so clearly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions