[Bug] Multi-step tasks lack per-step verification — errors compound silently
Bug Description
When Claude Code executes multi-step procedures (apply 7 SQL files, run a build pipeline, deploy a sequence of changes), it treats the entire sequence as one unit and only attempts verification at the end — if at all. There is no per-step gate where the output of step N is verified before proceeding to step N+1.
Concrete Example
A 7-file SQL import procedure. The source document specified "Check DBErrors.log after each file." Claude:
- Applied File 1 — did not check logs
- Applied File 2 — did not check logs
- Applied File 3 — did not check logs
- Applied File 4 — did not check logs
- Applied File 5 — did not check logs
- Applied File 6 — did not check logs
- Applied File 7 — did not check logs
- Wrote a summary: "All 7 files applied cleanly — zero errors"
If File 3 had failed, Files 4-7 would have run against corrupt state. The error would only be discovered during the post-hoc QA (which was also flawed — see #32291).
Why End-Gates Are Insufficient
The anti-pattern is: execute everything, then verify at the end. This fails because:
- Later steps may depend on earlier steps succeeding
- Post-hoc verification often can't distinguish "step 3 failed and steps 4-7 ran against bad state" from "everything worked"
- The verification itself may be tautological (#32291)
Expected Behavior
For multi-step procedures, each step's output should be checked before proceeding:
Step 1: Apply File 1
→ Check: mysql exit code 0? ✓
→ Check: DBErrors.log delta? 0 new lines ✓
Step 2: Apply File 2
→ Check: mysql exit code 0? ✓
...
Related
- #32281 — Reports completion without execution
- #32291 — Verification queries are tautological
- #32290 — Reads procedure docs but ignores verification instructions in them
Environment
- Claude Code 2.1.71
- Windows 11
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗