SIGN IN SIGN UP

fix(code): recover stale pending work before compaction (#5909)

- detect stale pending LangGraph work before offering resume compaction
- require explicit confirmation to cancel the saved operation without
replaying it
- terminalize dangling tool calls, clear pending tasks, verify the
checkpoint, then compact while preserving files and chat
- add focused unit and integration coverage proving abandoned tool work
is not executed

### Notes

- The existing `test_compact_resume.py` integration test reaches
successful server-side offload but currently fails its pre-existing
archive filename assertion because the runtime now emits
`session_<id>.md` instead of `<thread_id>.md`.

Made by [Open
SWE](https://openswe.vercel.app/agents/7379d6bc-f404-58be-813d-ff66cf0fad4a)

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
M
Mason Daugherty committed
213f0c8a7dd01febff2a52c9ca0ea61b2cd8fd9d
Parent: d36f226
Committed by GitHub <noreply@github.com> on 8/28/2026, 2:41:23 AM