What happens
Some node fields are path mode (a dotted state path, digest.summary), while their neighbours are template mode ({{ digest.summary }}). Writing template syntax into a path-mode field passes validation and resolves to undefined at run time, with no error.
Path-mode fields today (src/core/types.ts):
| Node |
Field |
Neighbour in template mode |
agent |
input |
task |
ai |
input |
prompt |
code |
input |
(run is code) |
branch |
on |
|
loop |
over |
|
How it bit us
A production flow on a customer box sent its digest through an agent node with input: "{{ digest.summary }}". The agent received no input, replied asking for the text, and sent nothing. Validation, publish and the run all reported success. Authors (human and agent) get this wrong often, because task directly above it takes the braces.
Proposal
- Validator: reject, or at least warn, when a path-mode field's value contains
{{. Message: "input" takes a state path like "digest.summary", not a template.
- Runner, optional: accept
{{ path }} in a path-mode field by stripping the braces when the whole value is one expression. Lenient, but removes the trap entirely.
- Runner: when a path-mode field is set but resolves to
undefined, fail the node (or trace a warning) instead of passing nothing along.
(1) alone would have caught this before publish.
What happens
Some node fields are path mode (a dotted state path,
digest.summary), while their neighbours are template mode ({{ digest.summary }}). Writing template syntax into a path-mode field passes validation and resolves toundefinedat run time, with no error.Path-mode fields today (
src/core/types.ts):agentinputtaskaiinputpromptcodeinputrunis code)branchonloopoverHow it bit us
A production flow on a customer box sent its digest through an
agentnode withinput: "{{ digest.summary }}". The agent received no input, replied asking for the text, and sent nothing. Validation, publish and the run all reported success. Authors (human and agent) get this wrong often, becausetaskdirectly above it takes the braces.Proposal
{{. Message:"input" takes a state path like "digest.summary", not a template.{{ path }}in a path-mode field by stripping the braces when the whole value is one expression. Lenient, but removes the trap entirely.undefined, fail the node (or trace a warning) instead of passing nothing along.(1) alone would have caught this before publish.