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.
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.
A shell script that ran yesterday will do the same thing today, given the same inputs. An agent step won’t: the model may choose a different approach, read different files, or phrase its output differently. That non-determinism is part of what makes agents useful — and it means that “what happened” can’t be reconstructed by running the workflow again. The only reliable record is the one written while it ran.
Anthropic’s guidance on building agents makes a related point: agents work best when they get ground truth from the environment at every step — tool results, test output — rather than relying on their own account. A receipt is that ground truth, kept.
The brief, the version of the workflow, the trigger that started it — manual, interval or a new commit — and the commit it ran on.
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.
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.
Approval steps record who approved and when — or that the run was rejected.
When a step fails, the receipt should say where and why in plain language, not just exit code 1.
Here is the shape of a receipt for a “review release” workflow — build and browser check in parallel, then a Git review, then a go/no-go report — that failed:
| Step | Result | Time | Note |
|---|---|---|---|
| Brief | — | — | Release 2.4, commit a1b2c3d, started by hand |
| Build | passed | 1 min 12 s | npm run build, exit 0 |
| Browser check | failed | 38 s | Checkout page: button “Pay now” not found |
| Git review | skipped | — | Condition “build and browser passed” not met |
| Go/no-go report | stopped | — | Waiting on skipped step |
Reading it takes ten seconds: the build is fine, the browser check failed on one page, and everything after it correctly didn’t run. Without the receipt, the same information is scattered over three terminal scrollbacks — if they still exist.
Workflow runs in PaneScale keep all of the above automatically:
Because every number comes from what PaneScale recorded, the receipt is the same whether the run succeeded or not, and whether anyone was watching. When a step fails, Retry unfinished steps runs the rest again without repeating what already passed.
The receipt can only be as clear as the workflow. A few habits make both better:
{{key}}. “Cause: {{cause}}” in a later instruction is easier to follow in a receipt than an unnamed blob of text.Receipts aren’t only for incidents. Every few weeks, look at the last ten runs of a workflow:
A workflow you can inspect is a workflow you can improve. See Workflows for the details.
A receipt records what the steps received and produced and what changed in the project — file names and line counts for agent steps. Keep it where you would keep any other build record, and review it before sharing it outside your team.
Yes — that is one of the best uses of a receipt. Two runs of the same workflow on different commits, side by side, show which step changed its result and how long each took. A step that suddenly takes three times as long is often the first sign of a problem in the code it checks.
Then the receipt says so. A command step uses no model tokens at all, and CLIs that don’t report usage are shown as not reported rather than estimated — the same rule as everywhere in PaneScale.
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.
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.
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.