fix: cron text payload silently ignores model override#2245
Open
BingqingLyu wants to merge 2 commits into
Open
fix: cron text payload silently ignores model override#2245BingqingLyu wants to merge 2 commits into
BingqingLyu wants to merge 2 commits into
Conversation
…lds are present When a cron payload uses the text field alongside agentTurn-only fields (model, fallbacks, thinking, etc.), coercePayload now infers agentTurn instead of systemEvent, converting text to message. Previously the model override was silently deleted because systemEvent payloads strip all agentTurn-only fields. This caused openclaw cron edit --model to have no effect on text-based payloads. Closes openclaw#28905
This was referenced May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
openclaw cron edit --modelhas no effect when the cron payload uses thetextfield instead ofmessage.When
kindis not explicitly set,coercePayload()inferssystemEventfrom the presence oftext, then strips all agentTurn-only fields includingmodel. The model override is silently discarded.This was reported in openclaw#28905 (closed as stale) — this PR provides the root-cause fix.
Fix
In
coercePayload(), whentextis present alongside agentTurn-only fields (detected by the existinghasAgentTurnPayloadHint()), inferagentTurnand promotetext→messageinstead of inferringsystemEvent.Before
After
Test plan
normalizeCronJobCreatewithtext+model→ verifies promotion to agentTurnnormalizeCronJobPatchwithtext+model→ verifies promotion to agentTurnkind: "systemEvent"+model→ still prunes model (no behavior change)pnpm checkpassesCloses openclaw#28905