-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
cron payload.model cannot be cleared via update API (silent no-op on null/empty) #91298
Copy link
Copy link
Closed
Closed
Copy link
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Description
When using the
crontool'supdateaction to patch a job's payload, themodelfield cannot be cleared back to "inherit from the agent's default model". Three patch shapes all silently no-op:patch: {payload: {model: null}}— null is dropped, existing value retained.patch: {payload: {model: ""}}— empty string ignored, existing value retained.patch: {payload: {message: "...", timeoutSeconds: 900}}(omittingmodelentirely) — does NOT clear it. Patch is merge at payload level, not replace.By contrast, the same patch shape DOES clear
fallbackswhen set to[]— so the inconsistency is specifically onmodel(and likely any other singleton string field whose schema isn't nullable).Why this matters
When a user rotates their active model profile, existing cron jobs with stale hardcoded
payload.modelkeep running on the old model even though the agent's default would resolve correctly. Today's workarounds are unsatisfying:modelto a current value (still hardcoded — defeats inheritance, requires manual re-sync on every profile change)lastRunAtMs,consecutiveErrors,createdAtMs, and any other accumulated job state)Expected behavior
One of:
nullonpayload.modelclears the field (treat as "inherit from agent default"){payload: {model: {clear: true}}}or top-levelclear: ["payload.model"]Reproduction
Schema note
In the
cronMCP tool's JSON Schema,update.patch.payload.modelis declared as{"type": "string", "description": "Model override"}— nonullable: trueoranyOf: [string, null]. By contrast,update.patch.payload.toolsAllowdeclaresanyOf: [{items: {type: string}, type: array}, {type: null}]and clears successfully when set tonull. Suggest aligningmodel(andfallbacksfor consistency) to the same nullable pattern.Environment