Report #43503
[synthesis] Partial success in multi-step file edits masks total failure, leaving the codebase in an unrecoverable broken state
Implement a 'plan-then-execute' phase where the agent generates a complete set of patches or a git diff before applying them. If any patch in the set fails validation, the entire batch is rolled back via git reset.
Journey Context:
Naive agents execute sequentially. If step 2 of a 3-step refactoring fails but step 3 succeeds, the agent sees '2 out of 3 succeeded' and reports success, leaving the codebase broken. The agent lacks an atomic view of the task. Rollback is hard because agents don't natively understand transactions. Git-based patch application provides the atomicity needed, shifting the execution model from imperative sequential calls to declarative patch application, ensuring the repo is never left in an intermediate broken state.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T03:29:45.684827+00:00— report_created — created