diff --git a/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts b/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts index 2661011f3c..5a10494078 100644 --- a/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts +++ b/apps/server/src/orchestration/Layers/ProviderRuntimeIngestion.ts @@ -1147,7 +1147,7 @@ const make = Effect.fn("make")(function* () { } } - if (event.type === "session.exited") { + if (event.type === "session.exited" && shouldApplyThreadLifecycle) { yield* clearTurnStateForSession(thread.id); } diff --git a/apps/server/src/provider/handoffSummary.ts b/apps/server/src/provider/handoffSummary.ts index 38fe8f4f95..38586e7e1b 100644 --- a/apps/server/src/provider/handoffSummary.ts +++ b/apps/server/src/provider/handoffSummary.ts @@ -72,11 +72,7 @@ function looksLikeCompactionItem(value: unknown): boolean { if (COMPACTION_TYPE_SNIPPETS.some((snippet) => type.includes(snippet))) { return true; } - return ( - typeof record.compact_summary === "string" || - typeof record.compactSummary === "string" || - typeof record.summary === "string" - ); + return typeof record.compact_summary === "string" || typeof record.compactSummary === "string"; } export function extractCompactionSummaryFromSnapshot(snapshot: {