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 result.messages 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
.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-*.json - When: Every workflow run (success or failure)
- Content: Per-node timing, inputs, outputs, template resolutions, errors
--report output is usually more useful for debugging.
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:Disk cleanup
Trace files accumulate over time. pflow doesn’t auto-delete them. If disk space becomes an issue: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.

