Skip to main content
Add approval: required to any step and the run pauses before that step, shows what is about to happen, and waits for a yes/no. This is how you trust a workflow with real-world actions — sending messages, creating issues, deploying — without giving up the final say.
At a terminal:
The preview shows resolved values — the actual message text, not ${...} templates — and every value in full, never cut short. A shell step’s env: values show as the text the command receives (true as True, null as empty). You approve what will happen, not the abstract definition.

Denying

Answering no stops the run cleanly before the step runs: nothing fired, nothing failed. The exit code is 3 (distinct from 1 for failures — a human verdict is not an error), and the trace records final_status: "denied".

Pre-approving gates

For CI or agent-operated runs, pre-approve specific gates by step name:
The flag is per-step and repeatable — there is deliberately no approve-everything form (on a loop step, one flag covers all its iterations; the browser’s Approve all remaining is that same per-step approval). Each pre-approval is recorded in the trace (resolved_via: flag), so you can always audit which gates a human answered live versus approved in advance.

Non-interactive runs pause — and you answer later

A run with no terminal (piped, launched from the web UI, or via the MCP server) cannot prompt. A gate reached without pre-approval pauses the run durably instead of failing — never hangs — and prints a resume token:
Nothing re-runs when you answer: the completed steps are kept, and the decision can come hours or days later — a pending pause is kept until it is answered, whatever the retention window, as long as its workflow file exists — through either surface:
  • In the browser: pflow ui <workflow> --run <token> opens the paused run on the visual canvas. The paused step carries a ⏸ badge with an answer panel showing the step’s resolved values — click Approve or Deny (for an escalation: pick an option or type an answer) and watch the run continue in place. On a loop step the panel shows where the loop is (iteration 2 of up to 3); Approve answers that one iteration, and Approve all remaining finishes the loop in one click — it approves every later approval of that step name in the run, including inside sub-workflows.
  • From the terminal: pflow resume <token> --approve yes|no (escalations: --choose "<answer>"). pflow resume list shows every pending pause.
A deny still exits 3 with final_status: "denied" — a human verdict, not an error. It refuses when the paused step was renamed, removed, cut off from the start, or lost its approval: required since the pause: there is no gate left to deny, so it refuses rather than risk running the step. Each answered pause produces a new attempt linked to the original run, so the decision trail stays auditable. A warning also fires at run start when the workflow has unapproved top-level gates. Use --dry-run to discover gates before running: gated steps are tagged […, approval] and summarized in a ⏸ footer.

Escalations — the agent asks you

The second gate kind is raised by an agent step at runtime instead of declared by you. When an agent step discovers a decision it should not make alone, it returns an escalation object (question, options, recommendation) in its structured output — the run pauses, you choose (pick an option or type an answer), and your decision is written back into the step’s result for the workflow to act on, typically by re-running the agent with the decision via loop:. See pflow guide approval for the escalation contract, the re-fork recipe, and the full rules (batch steps can’t be gated — gate around them; loop steps prompt every iteration, and a non-interactive gated loop pauses at each iteration as a new token; cached steps never prompt).