Two agent runs crashed on their own plan files—7 self-repair rules to save the whole run
petrusenko_max · x · 2026-10-30
Max Petrusenko's WhatsApp agent crashed twice in one day on its own daily plan: a KeyError on checkedafter, then a ValueError on a malformed item id. The builder writes the plan, the sender reads it—one bad field kills the entire send.
His fix: repair the plan at load time, with 7 rules:
- Validate in both builder and sender
- Fill missing checkedafter instead of crashing
- Fix a bad notbefore rather than discarding the run
- Fill missing jid, phone, kind, or key
- Auto-assign eventdate for undated event ids
- Reject only unrepairable items, and log each one
- One broken item stays one item—the rest of the plan still sends
Core principle: a plan your agent wrote is input—treat it like untrusted input.
More from coding & agent
- Memgraph 3.14 ships 11 breaking changes and tighter null/NaN semantics — JeremyCMorgan · 2026-10-30
- App Store Connect CLI 6.0 ships purchasing-power pricing, file-based metadata and StoreKit commands — rudrank · 2026-10-30
- ASC CLI 6.0 removes migrate metadata aliases; passwordless web auth replaces --password — rudrank · 2026-10-30
- ASC CLI 6.0: macOS publishing now requires PKG, --ipa with MAC_OS rejected — rudrank · 2026-10-30
- ASC CLI 6.0 breaking change: asc versions view returns Apple's envelope by default — rudrank · 2026-10-30
- ASC CLI 6.0 adds multi-territory price-point reads and pagination-free IAP price filters — rudrank · 2026-10-30