Break an engineering task into verifiable steps, and let the agent fail early rather than late.
A deterministic workflow names each step, its inputs, and a check that must pass before the next step runs. The agent still does the creative work, but the harness, not the model, decides whether a step succeeded, so a wrong turn surfaces at the gate instead of three steps downstream.
The payoff is debuggability: every run leaves an auditable trail of which check failed and why. Re-runs resume from the last green step rather than restarting, which keeps long tasks affordable and makes flaky behaviour reproducible.