Every run should leave a receipt

When agents work in multi-step workflows, “it worked” isn’t enough. What a run record should contain, and how PaneScale’s workflow runs provide it.

A workflow that runs an agent, then your tests, then a browser check, then waits for your approval is a small pipeline. Pipelines fail in interesting ways: a step times out, an output is malformed, a condition skips something you expected to run. When that happens a week later, you want to know exactly what happened — not reconstruct it from memory.

That is what a receipt is for.

What belongs in a receipt

The inputs

The brief, the version of the workflow, the trigger that started it — manual, interval or a new commit — and the commit it ran on.

Every step, in order

For each step: what it received, what it produced, how long it took, how many tokens it used if it reported them, and whether it passed, failed, was skipped by a condition or was stopped.

Evidence of change

Agent steps that may edit files should leave Git evidence: what the working tree looked like before and after the step. That turns “the agent updated the docs” into a list of files with line counts.

The decisions

Approval steps record who approved and when — or that the run was rejected.

An explanation when it fails

When a step fails, the receipt should say where and why in plain language, not just exit code 1.

How PaneScale does it

Workflow runs in PaneScale keep all of the above automatically:

  • a step log with inputs, outputs, durations and tokens,
  • Git evidence for agent steps,
  • a failure analysis that points at the step and the cause,
  • an exportable receipt of the whole run.

Because every number comes from what PaneScale recorded, the receipt is the same whether the run succeeded or not, and whether anyone was watching.

Use receipts to improve workflows

Receipts aren’t only for incidents. Every few weeks, look at the last ten runs of a workflow:

  • Which step fails most often? Usually it needs a clearer instruction or a better check.
  • Which step takes longest? Maybe it can run in a parallel group.
  • Which outputs feed the next step badly? Ask for JSON and turn on the JSON check.

A workflow you can inspect is a workflow you can improve. See Workflows for the details.

More articles

Five ways an agent can fake a green build

Agents rarely cheat on purpose, but under pressure to make tests pass they find shortcuts. Here is what to look for — and what PaneScale flags automatically.

Write tasks an agent can finish

The difference between a task that runs overnight and one that wanders is usually a single sentence — the finish line. A short template and examples.

Bypass mode: a decision table

Skipping an agent’s permission prompts saves hours — and occasionally costs a lot more. When it is reasonable, and what to put in place first.