diff --git a/src/hooks/bundled/session-memory/handler.ts b/src/hooks/bundled/session-memory/handler.ts index 3057d78f170..6aeb0ddcdda 100644 --- a/src/hooks/bundled/session-memory/handler.ts +++ b/src/hooks/bundled/session-memory/handler.ts @@ -444,14 +444,17 @@ const saveSessionToMemory: HookHandler = async (event) => { if (event.context.blockSessionSave === true && inlineWriteHappened) { // Privacy note: late-set blockSessionSave retracts the file but does NOT // prevent transcript content from having already been sent to the LLM - // provider for slug generation. To prevent transcript processing entirely, - // set blockSessionSave before the session-memory handler runs (pre-set path). - log.warn( - "blockSessionSave was set by a late hook — memory file will be retracted, but " + - "transcript content may have already been sent to the LLM provider for slug generation. " + - "To prevent transcript processing entirely, set blockSessionSave before the " + - "session-memory handler runs.", - ); + // provider for slug generation — but only when the transcript was actually + // loaded (i.e. no custom content was pre-set). When hasCustomContent is + // true, transcript loading and LLM calls were skipped entirely. + if (!hasCustomContent) { + log.warn( + "blockSessionSave was set by a late hook — memory file will be retracted, but " + + "transcript content may have already been sent to the LLM provider for slug generation. " + + "To prevent transcript processing entirely, set blockSessionSave before the " + + "session-memory handler runs.", + ); + } if (preExistingContent !== null) { // Slug collision: another entry already existed at this filename // before our inline write. Restore the original content rather