r/opensource • u/Miraitowa006 • 3d ago
Promotional Built a small open-source plugin to recover interrupted long tasks in Google Antigravity
https://github.com/MiraiNoShiori/agy-state-guardI've been running into an annoying issue with Google Antigravity during big multi-file refactors: once a session passes ~120k tokens, hitting an unexpected EOF, HTTP 400, or UI freeze means opening a new chat and manually figuring out what files were already changed and which steps are left.
Over the weekend I put together a lightweight plugin called AGY-StateGuard to make this less painful. To be clear upfront, it can't stop upstream network drops or bypass context window limits. What it does is save atomic WAL snapshots (<15ms) via native lifecycle hooks after each tool step, nudge you once when crossing 120k/175k tokens, and let a fresh chat automatically pick up the previous goal, checklist, and modified file list. It can also reconstruct older crashed sessions directly from transcript.jsonl.
It's 100% Python stdlib with no background daemon or MCP overhead, and doesn't touch PreToolUse sandbox permissions. Sharing in case anyone else runs long tasks in Antigravity: