Skip to content

[Bug]: LiveSessionModelSwitchError in cron jobs with payload.model override on 2026.3.28 #58459

@ms7-git

Description

@ms7-git

Bug Summary

Cron jobs with payload.model set to a non-default model are rejected with LiveSessionModelSwitchError before the LLM is called. This is a regression in 2026.3.28.

Bug Type

Regression (worked before, now fails)

Summary

Cron jobs with payload.model set to a non-default model (e.g. minimax/MiniMax-M2.7) 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.primary: minimax/MiniMax-M2.7
  2. Create a cron job targeting that agent with payload.model: minimax/MiniMax-M2.7 (explicitly setting the same model)
  3. Trigger the cron (scheduled or manual via `openclaw cron run`)
  4. Observe: LiveSessionModelSwitchError: Live session model switch requested: minimax/MiniMax-M2.7 in the run log
  5. Session aborts in under 1 second, no LLM call is made

Expected behavior

Cron jobs with payload.model overrides should run successfully on the specified model. The payload model override should be respected and the cron should complete normally.

Actual behavior

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

LiveSessionModelSwitchError: Live session model switch requested: minimax/MiniMax-M2.7

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

OpenClaw version

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

Operating system

macOS (Darwin), likely all platforms

Install method

npm install -g openclaw

Model

  • minimax/MiniMax-M2.7 (cron payload override)
  • ollama/glm-5:cloud (agent default)

Any combination of primary + override models triggers this, even when explicitly setting the same model.

Additional provider/model setup details

Logs, screenshots, and evidence

LiveSessionModelSwitchError: Live session model switch requested: minimax/MiniMax-M2.7

Impact and severity

All cron jobs using non-default models are broken. Users cannot use isolated session cron jobs with cloud models like minimax, OpenAI, Anthropic, etc.

Related Issues

Suggested fix

The per-agent model resolution logic should respect payload.model overrides in isolated cron sessions without triggering LiveSessionModelSwitchError. The fix should allow cron jobs to explicitly specify a model via payload.model and have that be honored in isolated sessions.

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