{"record":{"id":"940d95085793d92e","repo":"coleam00/Archon","slug":"node-with-ignored","errorCode":"node_with_ignored","errorMessage":"Node '${id}': 'with' is only supported on command, script, include, and workflow nodes — it is ignored here","messagePattern":"Node '(.+?)': 'with' is only supported on command, script, include, and workflow nodes — it is ignored here","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/workflows/src/loader.ts","lineNumber":677,"sourceCode":"  collectUnknownNodeKeys(raw, id, `Node '${id}'`, warnings);\n  collectGateAndLoopDeprecationWarnings(node, raw, id, warnings);\n\n  // `with:` is live on an agent node's command-sourced form (node-local bindings,\n  // #2637), on exec (script-runtime only), and on include/workflow (caller inputs).\n  // On every other node type Zod strips it silently — surface that through the\n  // parse-warnings channel (#2213) so an author learns the binding never attached,\n  // without rejecting YAML that loaded fine before.\n  const hasWithSupport =\n    isIncludeDirective(node) ||\n    isWorkflowNode(node) ||\n    isComposeFanOutNode(node) ||\n    (isExecNode(node) && node.runtime !== 'sh') ||\n    (isAgentNode(node) && node.source.kind === 'command');\n  if ((raw as Record<string, unknown>).with !== undefined && !hasWithSupport) {\n    warnings.push(\n      `Node '${id}': 'with' is only supported on command, script, include, and workflow nodes — it is ignored here`\n    );\n    getLog().warn({ id: node.id }, 'node_with_ignored');\n  }\n\n  // Warn about AI-specific fields on non-AI nodes (runtime behavior, not schema errors)\n  let nonAiNode: { type: string; fields: readonly string[] } | undefined;\n  if (isIncludeDirective(node)) {\n    nonAiNode = { type: 'include', fields: INCLUDE_NODE_IGNORED_FIELDS };\n  } else if (isComposeFanOutNode(node)) {\n    // Same execution-less posture as a static include: the composed body's own nodes\n    // carry their config, so AI-level fields declared here are ignored (#2512).\n    nonAiNode = { type: 'include', fields: INCLUDE_NODE_IGNORED_FIELDS };\n  } else if (isHaltNode(node)) {\n    nonAiNode = { type: 'cancel', fields: GATE_AND_HALT_IGNORED_FIELDS };\n  } else if (isWorkflowNode(node)) {\n    nonAiNode = { type: 'workflow', fields: WORKFLOW_NODE_IGNORED_FIELDS };\n  } else if (isGateNode(node)) {\n    nonAiNode = { type: 'approval', fields: GATE_AND_HALT_IGNORED_FIELDS };\n  } else if (isWaitNode(node)) {\n    nonAiNode = { type: 'wait', fields: WAIT_NODE_IGNORED_FIELDS };","sourceCodeStart":659,"sourceCodeEnd":695,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/workflows/src/loader.ts#L659-L695","documentation":"The workflow loader warns that a node declared a 'with:' key is on a node type that does not support it, so Zod silently strips the value and the bindings never attach. 'with' is live only on command-sourced agent nodes, exec nodes with a non-sh runtime (script), include directives, and workflow nodes. The file still loads; the warning exists so authors learn their node-local input bindings were discarded (#2213, #2637).","triggerScenarios":"Parsing a workflow YAML that sets `with:` on any node other than include/workflow/compose-fan-out nodes, exec nodes with runtime != 'sh', or agent nodes whose source.kind is 'command' — e.g. a plain prompt/agent node, a sh-runtime exec node, a gate, halt, or bash command node.","commonSituations":"Copy-pasting a `with:` block from a script node onto a prompt agent node; adding inputs to an exec node left at the default sh runtime; adding `with:` to a gate or halt node; assuming `with` is universal node syntax.","solutions":["Move the `with:` block to a supported node (command-sourced agent, script exec node with runtime set, include, or workflow node)","For exec nodes, set the node's runtime away from 'sh' if you intended a script node that accepts `with:`","If the target agent should receive inputs, switch it to source.kind 'command' where node-local bindings apply","Remove the `with:` key if the bindings were never actually needed"],"exampleFix":"# before\n- id: summarize\n  agent: writer\n  with:\n    topic: release-notes\n# after\n- id: summarize\n  agent: writer\n  source:\n    kind: command\n  with:\n    topic: release-notes","handlingStrategy":"validation","validationCode":"const WITH_SUPPORTED = new Set(['include', 'workflow', 'compose_fan_out']);\nfunction nodeSupportsWith(node) {\n  if (WITH_SUPPORTED.has(node.type)) return true;\n  if (node.type === 'exec') return node.runtime !== undefined && node.runtime !== 'sh';\n  if (node.type === 'agent') return node.source?.kind === 'command';\n  return false;\n}\n// assert nodeSupportsWith(node) for every node carrying `with:` before load","typeGuard":"function hasWithSupport(node) {\n  return ('type' in node) && (['include','workflow','compose_fan_out'].includes(node.type) ||\n    (node.type === 'exec' && node.runtime !== 'sh') ||\n    (node.type === 'agent' && node.source?.kind === 'command'));\n}","tryCatchPattern":null,"preventionTips":["Only attach `with:` to command/script/include/workflow nodes","For sh exec nodes, set an explicit non-sh runtime before adding `with:`","Capture and fail CI on loader parse warnings, not just load errors","When copy-pasting node templates, re-check which fields the target node type honors"],"tags":["workflow","yaml","node-config","ignored-field"],"backgroundTag":"unsupported-node-field","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}