Phase 10: flush persisted state on session_shutdown — SPEC §11.

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 <cursoragent@cursor.com>
This commit is contained in:
2026-06-17 12:47:05 +07:00
parent a5448b4002
commit ecddaf5752
+4
View File
@@ -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);
});