windmill-labs/windmill · error
Pipeline nodes must be in the open folder — use 'f/${folder}
Error message
Pipeline nodes must be in the open folder — use 'f/${folder}/${node}' (got '${path}'). What it means
Pipeline AI helpers validate that any node path the model or caller touches belongs to the currently open pipeline folder. assertInFolder throws this error when the given path does not start with `f/${folder}/`, i.e. the path references a node outside the open folder (or the folder itself, with no node leaf).
Source
Thrown at frontend/src/lib/components/assets/AssetGraph/pipelineAiHelpers.ts:150
return true
})
}
export function createPipelineAiHelpers(deps: PipelineAiHelperDeps): PipelineAIChatHelpers {
const folderName = () => normalizePipelineFolder(deps.getFolder())
// A staged draft is always persisted into the OPEN folder's data_pipeline
// bundle, so a path outside the folder would silently land an unrelated script
// there. Both build and edit must stay scoped to the folder.
function assertInFolder(path: string) {
const folder = folderName()
if (folder && !path.startsWith(`f/${folder}/`)) {
// Name the corrected path rather than only the required prefix: the model
// otherwise re-sends variants of the same wrong path. A path that is the
// folder itself has no node leaf to reuse.
const leaf = path.split('/').filter(Boolean).pop()
const node = !leaf || leaf === folder ? '<node_name>' : leaf
throw new Error(
`Pipeline nodes must be in the open folder — use 'f/${folder}/${node}' (got '${path}').`
)
}
}
// A pipeline node IS its `// pipeline` annotation (it's what makes the deployed
// script a pipeline member). Reject content that lacks it so a staged draft
// isn't a non-member script the model can't see is broken until deploy.
function assertPipelineAnnotation(content: string) {
if (!parsePipelineAnnotations(content).inPipeline) {
throw new Error(
`Pipeline node content must declare the pipeline annotation on its own comment line ` +
`(\`// pipeline\`, or \`-- pipeline\` for SQL / \`# pipeline\` for Python).`
)
}
}
function buildContext(): PipelineContext {View on GitHub (pinned to e474e8803c)
Solutions
- Rewrite the call using the required form `f/${folder}/<node_name>` as the error message suggests
- List the folder's nodes first and pick a node that exists in the currently open folder
- If you meant a different folder, open/switch to that folder before calling the helper
- If you passed the folder itself, append the node leaf: `f/${folder}/my_node`
Example fix
// before
await updateNode('u/admin/pipeline_step', content)
await updateNode('f/my_folder', content)
// after
await updateNode('f/my_folder/pipeline_step', content) Defensive patterns
Strategy: validation
Validate before calling
function assertPathInFolder(path: string, folder: string) {
if (folder && !path.startsWith(`f/${folder}/`)) {
throw new Error(`path ${path} is outside open folder f/${folder}/`)
}
}
assertPathInFolder(nodePath, openFolder) // call before any pipeline helper Type guard
function isInFolder(path: string, folder: string): boolean {
return !!folder && path.startsWith(`f/${folder}/`)
} Try / catch
try {
await updateNode(path, content)
} catch (e) {
if (e instanceof Error && e.message.includes('must be in the open folder')) {
const m = e.message.match(/use '([^']+)'/)
if (m) return updateNode(m[1], content) // retry with the corrected path the error suggests
}
throw e
} Prevention
- Always derive node paths from the open folder listing, never from memory or earlier contexts
- Copy paths verbatim from folder node lists instead of reconstructing them
- Remember the folder alone is not a valid node path — always append a node leaf
- For LLM tool calls, include the open folder name prominently in the prompt/context
When it happens
Trigger: Calling a pipeline AI helper (read/update/create node) with a path like `f/other_folder/node`, a root-level `u/user/script`, or the bare folder path `f/my_folder` while folder is open; the model hallucinating a path from an earlier context.
Common situations: LLM reusing node paths from a previously opened pipeline; constructing paths from memory instead of the provided folder listing; passing the folder itself instead of a node inside it; typos in the folder segment of the path.
Related errors
- Resource ${remotePath} uses '!inline_fileset ${dirPath}', bu
- Pipeline node content must declare the pipeline annotation o
- Cannot push flow ${remotePath}: step(s) reference non-worksp
- Flow path must be a .flow/__flow directory or a flow.yaml fi
- file path must refer to a file.
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/4d4eace2fcacfbd4.
Report an issue: GitHub.