Skip to content

Cron job payload.model override ignored — isolated sessions run on agent primary instead #67598

@zachware

Description

@zachware

Bug Report

Version: 2026.4.5

Summary: The model field set in a cron job's payload via openclaw cron edit --model <model> is not honored when the job runs. Isolated cron sessions always use the agent's primary model instead of the payload override.

Steps to Reproduce

  1. Create an isolated cron job for an agent whose primary model is anthropic/claude-sonnet-4-6
  2. Set a model override via CLI: openclaw cron edit <id> --model openrouter/auto
  3. Verify the config is written correctly (jobs.json shows payload.model: "openrouter/auto")
  4. Allow the job to run on its scheduled trigger (or run manually)
  5. Observe the session transcript — the session runs on claude-sonnet-4-6 (agent primary), not openrouter/auto

Expected Behavior

The cron session should use the model specified in payload.model, overriding the agent's default primary model.

Actual Behavior

The payload.model field is written correctly to cron/jobs.json but is silently ignored at runtime. The session uses the agent's primary model (claude-sonnet-4-6).

Config Evidence

{
  "sessionTarget": "isolated",
  "payload": {
    "kind": "agentTurn",
    "model": "openrouter/auto",
    "lightContext": true,
    "message": "Run this command exactly: python3 ..."
  }
}

Session transcript confirms model: claude-sonnet-4-6 on all assistant turns despite the override.

Impact

Cost issue: lightweight script-only cron jobs (e.g. running a Python script) are being billed at Sonnet rates instead of routing to cheaper/auto-selected models. Model pinning on cron jobs is a key cost control mechanism and it's not working.

Additional Context

  • Affects isolated cron sessions (sessionTarget: "isolated")
  • --light-context flag appears to be stored correctly but model override is not respected
  • Observed on macOS arm64, gateway running as LaunchAgent

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