From ecddaf57522dd1388c715a37c1c6f0357e79665f Mon Sep 17 00:00:00 2001 From: GRayHook Date: Wed, 17 Jun 2026 12:47:05 +0700 Subject: [PATCH] =?UTF-8?q?Phase=2010:=20flush=20persisted=20state=20on=20?= =?UTF-8?q?session=5Fshutdown=20=E2=80=94=20SPEC=20=C2=A711.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Append skill-reinject:state before extension teardown so the latest tracked skills and session override survive quit, reload, and session replacement. Co-authored-by: Cursor --- src/index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.ts b/src/index.ts index 2eb9c26..c7f4051 100644 --- a/src/index.ts +++ b/src/index.ts @@ -117,6 +117,10 @@ export default function skillReinject(pi: ExtensionAPI): void { restoreSessionState(ctx); }); + pi.on("session_shutdown", async () => { + persistState(); + }); + pi.on("session_before_compact", async () => { markAutoCompactionBeforeCompact(compactionRuntime); });