windmill-labs/windmill · error
The latest editor changes for ${type} "${path}" could not be
Error message
The latest editor changes for ${type} "${path}" could not be saved and are not readable; retry once the editor saves. What it means
Thrown while building the diff_workspace_item output when the editor's unsaved changes for the item cannot be flushed to the draft store and are therefore not readable. The 'draft' side of the diff would silently be stale, so the tool fails loudly instead of showing the model a diff against outdated code.
Source
Thrown at frontend/src/lib/components/copilot/chat/global/core.ts:6590
if (deployedSide !== undefined) {
beforeSide = { ...(deployedSide as Record<string, unknown>), path: deployedPath }
}
}
if (itemKind === 'variable') {
;({
before: beforeSide,
after: afterSide,
valueUncomparable
} = maskVariableDiffSides(beforeSide, afterSide))
flushCaveat += valueUncomparable ? SECRET_UNCOMPARABLE_NOTE : VARIABLE_MASKED_NOTE
}
const parts = computeDiffParts(beforeSide, afterSide, 'deployed', 'draft')
patch = parts.patch
files = parts.files
flushCaveat +=
'Note: this diff includes unsaved editor changes that are NOT saved to the server draft yet (auto-save is off or the last save failed).\n\n'
} else if (flushSkipped) {
throw new Error(
`The latest editor changes for ${type} "${path}" could not be saved and are not readable; retry once the editor saves.`
)
} else {
const entry = await readWorkspaceDiffEntry(workspace, itemKind, storagePath)
if (entry) {
if (entry.status === 'error') {
throw new Error(`Could not diff ${type} "${path}": ${entry.errorMessage}`)
}
patch = entry.patch ?? ''
noDeployed = entry.noDeployed === true
files = entry.files
valueUncomparable = entry.valueUncomparable === true
if (entry.valueMasked) {
flushCaveat += valueUncomparable ? SECRET_UNCOMPARABLE_NOTE : VARIABLE_MASKED_NOTE
}
} else {
// Not in the draft listing — either no draft at all (deployed is current),
// nothing at the path, or a listing/overlay disagreement; ask the overlay.View on GitHub (pinned to e474e8803c)
Solutions
- Wait for the editor's save to complete, then re-run the diff tool
- Check for draft-store or network errors that blocked the flush
- Fall back to the saved draft only after confirming the editor has nothing unsaved
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at frontend/src/lib/components/copilot/chat/global/core.ts:6590 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/f4e8e46f023d3187.
Report an issue: GitHub.