openclaw - 💡(How to fix) Fix [Bug]: cron with `agentId: main` silently routes to Opus when payload.model is dropped/rejected — should error or WARN with cost implications

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

A cron job that targets agentId: main and specifies payload.model to a cheap model can silently fall through to the parent agent's primary model when its payload.model is dropped or rejected by the gateway. If the parent agent's primary is claude-opus-4-7, the cron now burns Opus tokens without any user-visible warning.

Error Message

  1. No error, no WARN, no flag in cron list output.
  • (a) Fail loud: the cron run should error if payload.model is rejected, surfacing it in consecutiveErrors and the diagnostics summary.
  • (b) Log at WARN with cost implications: gateway log should emit cron <id>: payload.model <X> rejected, falling back to <parent.primary> so operators can grep for routing surprises.

Root Cause

Why this is dangerous

This was the root cause of the Apr 27 cron-leak incident: a cron whose payload.model got rejected silently fell through to Opus and burned $50+ before anyone noticed. The cron logs report success because the run did succeed — just with the wrong (expensive) model.

Fix Action

Fix / Workaround

Workaround in place

2026-05-03: all crons migrated off agentId=main onto a dedicated cron-default agent with a separate allowlist. This prevents the fall-through but doesn't address the underlying silence.

RAW_BUFFERClick to expand / collapse

Summary

A cron job that targets agentId: main and specifies payload.model to a cheap model can silently fall through to the parent agent's primary model when its payload.model is dropped or rejected by the gateway. If the parent agent's primary is claude-opus-4-7, the cron now burns Opus tokens without any user-visible warning.

Why this is dangerous

This was the root cause of the Apr 27 cron-leak incident: a cron whose payload.model got rejected silently fell through to Opus and burned $50+ before anyone noticed. The cron logs report success because the run did succeed — just with the wrong (expensive) model.

Reproduce

  1. Create a cron with agentId: main, payload.model: <model> where <model> is not in the agent's allowlist (or otherwise rejected).
  2. Run the cron.
  3. Observe the trajectory log — the request was made against the parent agent's primary (e.g. claude-opus-4-7), not <model>.
  4. No error, no WARN, no flag in cron list output.

Expected

Either:

  • (a) Fail loud: the cron run should error if payload.model is rejected, surfacing it in consecutiveErrors and the diagnostics summary.
  • (b) Log at WARN with cost implications: gateway log should emit cron <id>: payload.model <X> rejected, falling back to <parent.primary> so operators can grep for routing surprises.

Actual

Silent fall-through. Cron run is marked lastRunStatus: ok. The mismatch is only visible by manually correlating trajectory provider/model against the cron's payload.

Workaround in place

2026-05-03: all crons migrated off agentId=main onto a dedicated cron-default agent with a separate allowlist. This prevents the fall-through but doesn't address the underlying silence.

Environment

OpenClaw 2026.5.7 (eeef486); macOS.

Suggestion

Add a model-fallback/decision log line for cron runs when the requested payload.model is rejected, mirroring the existing log for embedded run failover.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: cron with `agentId: main` silently routes to Opus when payload.model is dropped/rejected — should error or WARN with cost implications