Skip to content

[Bug]: Cron payload model override ignored - LiveSessionModelSwitchError on 2026.3.28 #57112

@stemkat100

Description

@stemkat100

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Cron jobs with payload.model set to a non-default model (e.g. Sonnet) are rejected with LiveSessionModelSwitchError before the LLM is called. The new per-agent model resolution logic in 2026.3.28 compares the cron's payload model against the agent's configured default model, detects a mismatch, and aborts the session immediately. This worked correctly on 2026.3.24.

Steps to reproduce

  1. Configure an agent with agents.defaults.model: anthropic/claude-opus-4-6
  2. Create a cron job targeting that agent with payload.model: anthropic/claude-sonnet-4-6
  3. Trigger the cron (scheduled or manual via openclaw cron run <id>)
  4. Observe LiveSessionModelSwitchError: Live session model switch requested: anthropic/claude-opus-4-6 in the run log
  5. Session aborts in under 1 second, no LLM call is made

Expected behavior

On 2026.3.24, cron jobs with payload.model overrides ran successfully on the specified model. The payload model override was respected and the cron completed normally.

Actual behavior

Every cron run with a payload.model that differs from the agent's default model fails instantly with:

LiveSessionModelSwitchError: Live session model switch requested: anthropic/claude-opus-4-6

The error fires at the top of the run loop in resolvePersistedLiveSelection() before any LLM call is made. Duration is under 1 second (observed: 703ms). The run is aborted completely.

OpenClaw version

2026.3.28 (regression introduced), 2026.3.24 (last known good)

Operating system

macOS 15.3.2 (Darwin 25.3.0, arm64, Apple Silicon Mac Mini)

Install method

npm install -g openclaw (Homebrew Node.js v25.6.1)

Model

anthropic/claude-sonnet-4-6 (cron payload override), anthropic/claude-opus-4-6 (agent default)

Provider / routing chain

Direct Anthropic API (no proxy, no router)

Additional provider/model setup details

No response

Logs, screenshots, and evidence

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