windmill-labs/windmill · error · Error

describeDroppedScheduleOptions(dropped)

Error message

describeDroppedScheduleOptions(dropped)

What it means

When writing a schedule draft, unknown or misplaced option keys are detected by comparing the merged input against the parsed schema output. If any keys would be silently dropped, this error is thrown listing them, instead of letting them vanish unnoticed.

Source

Thrown at frontend/src/lib/components/copilot/chat/global/core.ts:3555

			writeScheduleToolSchema,
			'write_schedule',
			'Create or overwrite a draft schedule.',
			{ strict: false }
		),
		showDetails: true,
		streamArguments: true,
		showFade: true,
		fn: async (ctx) => {
			const { advanced, ...rest } = (ctx.args ?? {}) as Record<string, unknown>
			// `advanced` carries what the definition does not list, so a named argument
			// outranks a duplicate of the same key inside the bag. The whole merged object
			// is checked for stripped keys, not just the bag: an advanced option passed at
			// the top level instead would otherwise be dropped without a word.
			const merged = { ...((advanced as Record<string, unknown>) ?? {}), ...rest }
			const parsed = writeScheduleSchema.parse(merged)
			const dropped = droppedOptionKeys(merged, parsed)
			if (dropped.length) {
				throw new Error(describeDroppedScheduleOptions(dropped))
			}
			return writeScheduleDraft(parsed, ctx)
		}
	},
	{
		def: createToolDef(
			writeTriggerSchema,
			'write_trigger',
			'Create or overwrite a draft trigger.',
			{ strict: false }
		),
		showDetails: true,
		streamArguments: true,
		showFade: true,
		fn: async (ctx) => {
			const parsed = writeTriggerSchema.parse(ctx.args)
			// writeTriggerDraft dispatches on `kind`, so a config belonging to another kind
			// has to be rejected here rather than reaching the API as a corrupt draft. The

View on GitHub (pinned to e474e8803c)

Solutions

  1. Move advanced options into the 'advanced' object instead of the top level
  2. Remove or correct keys that are not part of writeScheduleSchema
  3. Call the schedule schema/get tool first to see the accepted fields, then retry

Example fix

// before
writeSchedule({ path: 'p/sched', schedule: 'x', timezone: 'UTC', summary: 'oops' })
// after
writeSchedule({ path: 'p/sched', schedule: 'x', timezone: 'UTC' })
Defensive patterns

Strategy: validation

Validate before calling

const merged = { ...advanced, ...rest };
const parsed = writeScheduleSchema.safeParse(merged);
if (!parsed.success) fixKeysBeforeWriting();

Type guard

function isKnownScheduleKey(k) { return k in writeScheduleSchema.shape; }

Try / catch

try { writeSchedule(args) } catch (e) { if (e.message.startsWith('Dropped')) moveKeysIntoAdvanced(e); }

Prevention

When it happens

Trigger: A write_schedule tool call includes keys not part of writeScheduleSchema (e.g. an advanced option placed at the top level of the args bag instead of inside the advanced object), so droppedOptionKeys(merged, parsed) returns a non-empty list.

Common situations: The model nests schedule options in the wrong place, uses an out-of-schema field name, or passes a deprecated option key.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03). Data as JSON: /api/errors/ead66c89dbf5fa62. Report an issue: GitHub.