Latest stable

Workflow Runner

Ordered YAML automation for commands and agents whose responses, artifacts, and sessions must survive every process boundary.

Use it for ordered work

Choose Workflow Runner when a step consumes {{ steps.<id>.response }}, a generated file, or a session from an earlier step. It is appropriate for reviewed operator playbooks, validation pipelines, agent chains, and final handoff.

Do not use it as an unnecessary wrapper around independent items. Parallel Runner owns concurrent fan-out and can launch several complete workflows through command-file mode.

Prerequisites

  • An initialized project and installed workflow_runner.sh.
  • A YAML workflow path or --workflow - for stdin.
  • Commands available from --run-root; relative paths resolve there.
  • A reviewed failure policy for each costly or destructive step.

Start from an example, then lint

agent chain
./.juno_task/scripts/workflow_runner.sh --init-example agent-chain .juno_task/workflows/agent-chain.yaml
./.juno_task/scripts/workflow_runner.sh lint --workflow .juno_task/workflows/agent-chain.yaml
./.juno_task/scripts/workflow_runner.sh --workflow .juno_task/workflows/agent-chain.yaml --dry-run
./.juno_task/scripts/workflow_runner.sh --workflow .juno_task/workflows/agent-chain.yaml

Resume by zero-based index, step id/name, or -1 for the final step. Use --print-output summary|none|STEP to control final console output without discarding artifacts.

Safety and failure contract

  • Step failures are recorded but the workflow exits zero by default. Set fail_workflow: true where automation must stop.
  • Agent commands that exit zero with an empty response are failed.
  • The runner does not inject --quiet; agent stdout is the response and successful stderr remains an artifact.
  • Use response fields, not raw stderr, in downstream prompts.
  • Lint before cron or unattended execution and dry-run rendered commands first.

Artifacts and session handoff

Runs default to .juno_task/specs/workflows/WORKFLOW_ID/RUN_ID and persist the manifest, rendered configuration, step stdout/stderr/response, statuses, summary, and session IDs. Detected YYLO, yy, and ypl steps receive capture variables automatically.

The final successful agent session is persisted for yy cc. Set top-level continue_from_step to hand off one explicit step; selection is strict and fails when that step has no session ID.

Lint before; doctor after

diagnostics
./.juno_task/scripts/workflow_runner.sh lint --workflow workflow.yaml
./.juno_task/scripts/workflow_runner.sh doctor .juno_task/specs/workflows/<workflow_id>/<run_id>
# short alias
./.juno_task/scripts/workflow_runner.sh dr .juno_task/specs/workflows/<workflow_id>/<run_id>

Lint catches noisy stdout/stderr template anti-patterns before launch. Doctor inspects the manifest and response artifacts after a run.

Troubleshooting

  • If a downstream value is empty, inspect the producing step’s response artifact and use {{ steps.<id>.response }}.
  • If the process unexpectedly exits zero, check whether the failed step omitted fail_workflow: true.
  • If continuation selects the wrong session, set continue_from_step and run doctor.
  • If output is noisy, choose --no-print-step-stdout --print-output summary; evidence remains on disk.

Freshness sources

Reviewed against the current YYLO README Workflow Runner contract and workflow_runner.sh --help, including subprocess failure, response, artifact, and continue-handoff behavior.