-
-
Notifications
You must be signed in to change notification settings - Fork 69.7k
sessions_list shows agent default model instead of actual cron model override #21057
Description
Bug Description
sessions_list returns the agent's default model for cron/isolated sessions, even when the cron job specifies a different payload.model. This is misleading for cost analysis.
Steps to Reproduce
- Configure a cron job with
agentId: "main"(default model:claude-opus-4-6) andpayload.model: "google-gemini-cli/gemini-3-flash-preview" - Let the cron job run
- Call
sessions_listand check the session'smodelfield
Expected Behavior
sessions_list should show the actual runtime model (gemini-3-flash-preview) — either the model from payload.model or the last model_change event in the transcript.
Actual Behavior
sessions_list shows claude-opus-4-6 (the agent's default model), even though the transcript confirms the session ran on gemini-3-flash-preview (with model_change event and usage.cost.total=0).
Impact
When analyzing token costs across sessions, this makes it appear that expensive Opus tokens are being consumed by cron jobs that are actually running on free Flash models. This caused a false alarm during our cost audit today.
Environment
- OpenClaw version: 2026.2.17 (build 4134875)
- Cron config:
sessionTarget: "isolated",payload.model: "google-gemini-cli/gemini-3-flash-preview" - Agent default model:
claude-opus-4-6