Your agent handles most debugging
When a workflow fails, your agent receives detailed information about what went wrong:- What failed - Which node, what error category
- What’s available - The fields that DO exist (not just what’s missing)
- Suggestions - “Did you mean?” recommendations
- Execution state - Which nodes succeeded before the failure
What your agent sees
When a workflow fails, errors include the data needed for self-correction:msg doesn’t exist, but stdout does. It fixes the template and retries. No human intervention needed.
These errors are specific because the error space is finite — pflow knows every node type and every declared output. When agents compose known building blocks instead of writing arbitrary code, errors say “node X doesn’t output Y, did you mean Z?” instead of handing you a stack trace.
Execution reports
The--report flag generates a structured execution report — a directory of readable markdown files, one per node:
- summary.md — pipeline table with per-node cost, errors with fix suggestions, anomaly warnings for suspicious empty outputs
- Per-node files — rendered prompts (what the LLM actually received), full responses, model/token/cost metadata
- Batch items — per-item files showing individual prompts and responses
- Sub-workflows — nested directories mirroring the workflow structure
api_key, token, password, Authorization, Cookie, …) show as <REDACTED> in the report, and so does a run’s secret value wherever it appears — in a command, stderr or a response (see secret values). The trace keeps them raw so resume can restore them. Any other secret inside free text, such as a key exported only in your shell, is not detected.
Reports are ephemeral — the default location is overwritten each run. The trace files are the run history, kept for the retention window. You can regenerate a report from any run in that window:
.pflow-report.json, the marker pflow writes into report output.
Comparing runs with git diff
Write reports to a project-local folder. Stage the report, edit a prompt, re-run —git diff shows exactly what changed:
Trace files
pflow automatically saves detailed execution traces:- Location:
~/.pflow/debug/workflow-trace-{hash}-{name}.{run id}-{start time}.json(a paused run also gets an empty.pausedfile beside its trace) - When: Every workflow run (success or failure)
- Content: Per-node timing, inputs, outputs, template resolutions, errors
--report output is usually more useful for debugging.
Traces written by an earlier pflow version use an older filename.
pflow resume, pflow resume list, pflow report, --only and the Viewer don’t search them. When one of the commands finds nothing, it says how many older traces it skipped (so does the Viewer’s gate panel; its run history and run links don’t). You can still read one with pflow report <path>, and it ages out like any other trace. After upgrading, --only needs one full run first.Answer pending pauses before upgrading, and don’t run an older and a newer pflow against the same ~/.pflow: an older pflow can answer a newer pflow’s pause without the newer one seeing that answer, an older pflow’s settings command drops trace_retention_days from the settings file, and the newer pflow ages out the older one’s traces — pending pauses included — after the window. If you must mix versions and want to keep every trace, set both opt-outs: trace_retention_days: 0 in the settings file (read by every pflow process) and PFLOW_TRACE_RETENTION_DAYS=0 (survives an older version’s settings write, but only for processes that inherit it — an MCP server launched by a desktop app does not see your shell’s exports).What only you can fix
Some things require human action. Your agent will tell you when these come up:API key not configured
If pflow’s discovery features aren’t working:MCP server issues
If your agent reports MCP tools aren’t available:Trace retention
pflow removes traces older than the retention window — 14 days by default — each time it finishes writing a trace. Read-only commands (pflow report, pflow resume list, pflow ui) never remove anything. Whatever their age, pflow keeps:
- a paused run still waiting for an answer
- each workflow’s newest successful run (what
--onlyrestores from) - each workflow’s newest run, whatever its status (what
pflow reportshows) - a resumed run’s trace, until the run it resumed is gone
- a trace a running workflow is still writing
--only and pflow resume need the file.
To change the window, set runtime.trace_retention_days in ~/.pflow/settings.json (0 keeps every trace):
PFLOW_TRACE_RETENTION_DAYS overrides it for one process (in your shell, or stored with pflow settings set-env) and is never saved to runtime. Spell the opt-out exactly. If pflow can’t trust the setting — the settings file fails to load, a retention-looking key is misspelled or in the wrong section, a PFLOW_ variable looks like a misspelling of PFLOW_TRACE_RETENTION_DAYS, or the value isn’t a whole number of days — it removes nothing and prints a warning saying why. pflow settings show ends with the retention window in effect.
Don’t delete traces by hand: removing a trace breaks --only, pflow resume, the answer to a pending pause and pflow report for that run.
Summary
pflow is built for self-correction. Your agent has the tools and knowledge to debug most issues — you only step in for setup tasks that require human access.

