Summary
In a YAML workflow, an agent step with verification: { type: exit_code } and
no value fails a step that actually succeeded, with:
Verification failed for "draft": recorded exit code "0" did not match "undefined"
The agent exited 0 (success), but because no expected value was supplied the
engine compares "0" against undefined and fails. The natural author intent —
"pass if the step exits 0" — is silently wrong.
Repro
- name: draft
type: agent
agent: drafter
task: |
...write out/draft.md...
verification:
type: exit_code # no `value:` -> compares "0" vs undefined -> FAIL
Run → the step runs fine, produces its artifact, exits 0, and the workflow still
reports FAILED at that step.
Fix on the author side: add value: '0'.
Notes
- The bundled example
examples/yaml/fix-dashboard-user-registration.yaml uses
the same verification: { type: exit_code } (no value) on its agent steps, so
it presumably hits this too.
- The TS builder examples write
{ type: 'exit_code', value: '0' }; the YAML
path should behave the same when value is omitted.
Expected
verification: { type: exit_code } with no value should default to '0'
(success), OR flows/relayflows validation (--dry-run) should reject the
step up front with a clear "exit_code verification requires a value" error —
never silently fail a passing step at runtime.
Acceptance criteria
type: exit_code with no value either defaults to '0' or fails validation
at --dry-run, with a message naming the fix.
- The bundled YAML example is updated accordingly.
Context
Hit while preparing a first-run example for a prospect (Altek). relayflows CLI 1.0.6.
Summary
In a YAML workflow, an agent step with
verification: { type: exit_code }andno
valuefails a step that actually succeeded, with:The agent exited 0 (success), but because no expected
valuewas supplied theengine compares
"0"againstundefinedand fails. The natural author intent —"pass if the step exits 0" — is silently wrong.
Repro
Run → the step runs fine, produces its artifact, exits 0, and the workflow still
reports FAILED at that step.
Fix on the author side: add
value: '0'.Notes
examples/yaml/fix-dashboard-user-registration.yamlusesthe same
verification: { type: exit_code }(no value) on its agent steps, soit presumably hits this too.
{ type: 'exit_code', value: '0' }; the YAMLpath should behave the same when
valueis omitted.Expected
verification: { type: exit_code }with novalueshould default to'0'(success), OR
flows/relayflowsvalidation (--dry-run) should reject thestep up front with a clear "exit_code verification requires a value" error —
never silently fail a passing step at runtime.
Acceptance criteria
type: exit_codewith novalueeither defaults to'0'or fails validationat
--dry-run, with a message naming the fix.Context
Hit while preparing a first-run example for a prospect (Altek). relayflows CLI 1.0.6.