{"record":{"id":"a0cbd6ffc1380915","repo":"windmill-labs/windmill","slug":"describedroppedscheduleoptions-dropped-a0cbd6","errorCode":null,"errorMessage":"describeDroppedScheduleOptions(dropped)","messagePattern":"describeDroppedScheduleOptions\\(dropped\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/src/lib/components/copilot/chat/workspaceTools.ts","lineNumber":335,"sourceCode":"\t\ttry {\n\t\t\tconst { advanced, ...rest } = (args ?? {}) as Record<string, unknown>\n\t\t\t// `advanced` carries what the definition does not list: a named argument outranks\n\t\t\t// a duplicate inside the bag, and the runnable target outranks both. The whole\n\t\t\t// merged object is checked for stripped keys, not just the bag: an advanced option\n\t\t\t// passed at the top level instead would otherwise be dropped without a word.\n\t\t\tconst merged = {\n\t\t\t\t...((advanced as Record<string, unknown>) ?? {}),\n\t\t\t\t...rest,\n\t\t\t\t...getWorkspaceMutationTargetFields(helpers)\n\t\t\t}\n\t\t\tconst requestBody = parseWithExplicitErrors(\n\t\t\t\tscheduleRequestSchema as z.ZodType<NewSchedule>,\n\t\t\t\tmerged,\n\t\t\t\t'Schedule'\n\t\t\t)\n\t\t\tconst dropped = droppedOptionKeys(merged, requestBody)\n\t\t\tif (dropped.length) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\tdescribeDroppedScheduleOptions(dropped)\n\t\t\t\t)\n\t\t\t}\n\n\t\t\ttoolCallbacks.setToolStatus(toolId, {\n\t\t\t\tcontent: `Validating schedule \"${requestBody.path}\"...`\n\t\t\t})\n\t\t\ttry {\n\t\t\t\tawait ScheduleService.previewSchedule({\n\t\t\t\t\trequestBody: {\n\t\t\t\t\t\tschedule: requestBody.schedule,\n\t\t\t\t\t\ttimezone: requestBody.timezone,\n\t\t\t\t\t\tcron_version: requestBody.cron_version ?? undefined\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t} catch (error) {\n\t\t\t\tthrow new Error(`Invalid schedule or timezone: ${formatToolError(error)}`)\n\t\t\t}","sourceCodeStart":317,"sourceCodeEnd":353,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/frontend/src/lib/components/copilot/chat/workspaceTools.ts#L317-L353","documentation":"After merging `advanced` options with top-level args for create_schedule, droppedOptionKeys detects keys that were swallowed (not represented in the parsed NewSchedule body). If any option the caller supplied would be silently dropped, describeDroppedScheduleOptions produces this error instead of creating a half-configured schedule. It protects against schema/definition drift where an advanced option is passed under the wrong level or name.","triggerScenarios":"The agent passes schedule options (e.g. retry, pause, tags, error handler) either at the top level instead of inside `advanced`, or under a misspelled/unknown key inside `advanced`, such that after zod parsing the key does not survive into the request body.","commonSituations":"Model invents an option name not in the schedule schema; an option from get_schedule_schema is placed at the top level next to `advanced` and outranked/duplicated; newer server-side schedule fields not yet in the frontend schema.","solutions":["Call get_schedule_schema and move the listed option into the `advanced` object with its exact name","Remove the unrecognized/unsupported option and retry with only schema-listed fields","Update the frontend schedule schema if a legitimately new server option is missing"],"exampleFix":"// before\ncreate_schedule({ path: 's/x', schedule: '* * * * *', retry: { retries: 3 } })\n// after\ncreate_schedule({ path: 's/x', schedule: '* * * * *', advanced: { retry: { retries: 3 } } })","handlingStrategy":"validation","validationCode":"const known = new Set(Object.keys(scheduleRequestSchema.shape))\nconst supplied = Object.keys(merged)\nconst bad = supplied.filter((k) => !known.has(k))\nif (bad.length) throw new Error(`Unsupported schedule options: ${bad.join(', ')}`)","typeGuard":null,"tryCatchPattern":"try {\n  await createSchedule(args)\n} catch (e) {\n  if (/dropped/i.test((e as Error).message)) {\n    const schema = await getScheduleSchema()\n    return createSchedule(withAdvancedFromSchema(schema, args))\n  }\n  throw e\n}","preventionTips":["Pass advanced options only inside the `advanced` object","Source option names exclusively from get_schedule_schema output","Diff your arguments against the schema keys before sending"],"tags":["copilot","schedules","validation","options-dropped"],"backgroundTag":"unknown-option-rejected","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}