windmill-labs/windmill · error
A draft already exists at '${path}'. Use edit_pipeline_node
Error message
A draft already exists at '${path}'. Use edit_pipeline_node to change it instead. What it means
pipelineAiHelpers proposeNode (build_pipeline_node tool) rejects a target path that already has a local draft in the open folder; the model asked to CREATE a node where a draft exists, which would silently overwrite staged work — the tool directs it to edit_pipeline_node instead.
Source
Thrown at frontend/src/lib/components/assets/AssetGraph/pipelineAiHelpers.ts:240
if (!workspace) return undefined
try {
const deployed = await ScriptService.getScriptByPath({ workspace, path })
return { language: deployed.language, content: deployed.content }
} catch {
return undefined
}
},
proposeNode: async ({ path, language, content, outputKind }) => {
deps.ensureEditable?.()
// build_pipeline_node creates a NEW node in the OPEN folder. Reject a path
// outside the folder (it would silently stage into this folder's bundle)
// and a path that collides with an existing node (the model should use
// edit_pipeline_node instead of shadowing a deployed node as a draft).
assertInFolder(path)
assertPipelineAnnotation(content)
const drafts = deps.getDrafts()
if (drafts.has(path)) {
throw new Error(
`A draft already exists at '${path}'. Use edit_pipeline_node to change it instead.`
)
}
if (deps.getResolvedGraph().runnables.some((r) => r.path === path)) {
throw new Error(
`A pipeline node already exists at '${path}'. Use edit_pipeline_node to change it instead.`
)
}
// Authoritative new-node check: the resolved graph may not have hydrated yet
// (the session preview can race open_preview), and it only lists pipeline
// runnables — so probe the backend. ANY deployed script at this path means
// "build new" would shadow it on deploy; the model should edit instead.
const workspace = deps.getWorkspace()
if (workspace) {
let deployedExists = false
try {
await ScriptService.getScriptByPath({ workspace, path })
deployedExists = trueView on GitHub (pinned to e474e8803c)
Solutions
- Use edit_pipeline_node on that path to modify the existing draft.
- Pick a different path if a genuinely new node is intended.
- Discard the existing draft first if it should be replaced by a fresh build.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at frontend/src/lib/components/assets/AssetGraph/pipelineAiHelpers.ts:240 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/bd927e86cc73a97a.
Report an issue: GitHub.