#Cron `agentTurn` jobs ignore `payload.model` / `agentId` and still run on the main default model (`g

1 messages · Page 1 of 1 (latest)

latent jackal
#

Issue:
Hey — I found what looks like a real cron model-routing bug in OpenClaw.

I’m trying to run cron jobs on openai-codex/gpt-5.2 because gpt-5.4 is too expensive for scheduled jobs.

What we tested:

  1. Updated existing cron jobs so they explicitly have:
  • sessionTarget: "isolated"
  • payload.kind: "agentTurn"
  • payload.model: "openai-codex/gpt-5.2"
  1. Verified in the live cron list and in ~/.openclaw/cron/jobs.json that the jobs really are stored with:
  • payload.model: "openai-codex/gpt-5.2"
  1. Forced a run manually and checked the actual run record:
  • the job still ran on gpt-5.4
  1. Restarted the gateway and forced the same job again:
  • still ran on gpt-5.4
  1. Created a completely fresh test cron job from scratch with:
  • payload.model: "openai-codex/gpt-5.2"
  • sessionTarget: "isolated"
  • then forced it immediately
  • live execution still surfaced under the main Discord session on gpt-5.4
  1. Created a dedicated agent:
  • id: cron-codex-52
  • model: openai-codex/gpt-5.2

Then updated the cron job to:

  • agentId: "cron-codex-52"

Forced it again, and it still ran on gpt-5.4.

Expected behavior

If a cron agentTurn job is configured with:

  • payload.model = openai-codex/gpt-5.2

or even bound to an agent whose model is:

  • openai-codex/gpt-5.2

then the actual cron run should execute on gpt-5.2.

Actual behavior

Fresh forced cron runs still execute on gpt-5.4, which appears to be the main/default model.

Strongest clue

Even when the cron job is isolated and freshly forced, the live session state often shows it surfacing through:

  • agent:main:discord:channel:...
    with model:
  • gpt-5.4

So it looks like cron runtime is ignoring the cron model override / bound agent model and falling back to the main default runtime model.

Why this matters

This makes cron jobs much more expensive than intended, because cost-sensitive scheduled tasks can’t actually be pinned to a cheaper model.

ionic gustBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

latent jackal
#

@hearty trench

hearty trenchBOT
#

You’re probably hitting two behaviors at once (which totally looks like a routing bug):

  1. Isolated cron jobs default to subagent model settings
    If agents.defaults.subagents.model is set (often to your main expensive model), cron isolated runs will pick that baseline.

  2. payload.model can be silently rejected by model allowlist
    If agents.defaults.models exists and doesn’t include openai-codex/gpt-5.2, cron logs a warning and falls back to defaults.

And the “it surfaced in agent:main:discord:... on gpt-5.4” clue is also consistent with cron announce flow posting summary activity via main-session routing.

Can you paste these so we can confirm fast:

openclaw --version
openclaw config get agents.defaults.subagents.model
openclaw config get agents.defaults.models
#
openclaw cron runs --id <jobId> --limit 5
openclaw logs --follow

Then trigger one forced run and look for a log like:

cron: payload.model '...' not allowed, falling back to agent defaults

If that shows up, fix is:

  • include openai-codex/gpt-5.2 in agents.defaults.models (if you use allowlist), and/or
  • set agents.defaults.subagents.model to the cheaper model (or unset it if you want agent defaults to win).

Docs:

#

Yep — I dug into source behavior, and your symptoms match this exact combo:

  • Isolated cron runs use agents.defaults.subagents.model as baseline (not main agent model.primary).
  • payload.model is validated against allowed models; if disallowed, cron logs a warning and falls back.
  • Announce flow can show activity in main Discord session, which makes it look like the whole run used main model.

So this can absolutely look like “cron ignored payload.model and agentId” even when storage is correct.

Can you post these 4 outputs so we can confirm your exact case:

openclaw --version
openclaw config get agents.defaults.subagents.model
openclaw config get agents.defaults.models
openclaw cron runs --id <jobId> --limit 5