fab99e828a
main carried three hand-rolled copies of the same recovery policy — prompt.submit (submit.ts), session.interrupt (cancelRun) and session.redirect (steering) each open-coded isSessionNotFoundError -> resolveSessionProfile -> session.resume -> retry. Three copies of one policy is how call sites drift apart, and it is why the RPCs that were never given a copy (attach, /compress, checkpoint restore) still surface a raw "session not found" after sleep/wake while plain text silently recovers. Introduce withSessionNotFoundResume() as the single resolver and move all three existing copies onto it. Profile resolution is injected rather than imported so the helper is unit-testable without reaching through resolveStoredSession -> getSession(); a drift callback lets each caller keep its own abort semantics via SessionRecoveryAborted. Co-authored-by: xxxigm <xxxigm@users.noreply.github.com>