Skip to content

[Bug]: --model flag on isolated cron jobs does not override session model #58575

@litefut

Description

@litefut

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

openclaw cron add/edit --model anthropic/claude-haiku-4-5 --session isolated sets the model correctly in payload.model, but the isolated session always initializes with the default model (claude-sonnet-4-6) instead.

Steps to reproduce

  1. openclaw cron add --name "test" --cron "* * * * *" --session isolated --message "hello" --model anthropic/claude-haiku-4-5
  2. Wait for or manually trigger: openclaw cron run
  3. Check session JSONL: ~/.openclaw/agents/main/sessions/.jsonl
  4. Observe model_change event shows default model, not haiku

Expected behavior

Per the docs: "Resolution priority: 1. Job payload override (highest)"
The isolated cron session should start with the specified model.

Actual behavior

Session transcript shows:

{"type":"model_change","modelId":"claude-sonnet-4-6"}

### OpenClaw version

• OpenClaw: 2026.3.28 (f9b1079)

### Operating system

 macOS 25.3.0 (arm64)

### Install method

npm (global install) - OpenClaw version: 2026.3.28

### Model

anthropic/claude-sonnet-4-6

### Provider / routing chain

- No proxy, no router, no external gateway

### Additional provider/model setup details

_No response_

### Logs, screenshots, and evidence

```shell

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    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