When workflows fail, pflow gives your agent structured error data — available fields, types, and fix suggestions. Since agents build and fix workflows, error messages are the primary interface. They say what’s wrong, what’s available instead, and how to fix it. Your role in debugging is minimal. Most of the time, you don’t need to do anything.Documentation Index
Fetch the complete documentation index at: https://docs.pflow.run/llms.txt
Use this file to discover all available pages before exploring further.
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
| Situation | Who handles it |
|---|---|
| Workflow fails with fixable error | Your agent (self-corrects) |
| Agent needs more context | Your agent (reads trace files) |
| API key not configured | You (agent tells you the command) |
| MCP server not connected | You (agent guides you) |
| Disk space from traces | You (manual cleanup) |

