{"record":{"id":"944485c0a62d8a1d","repo":"thedotmack/claude-mem","slug":"empty-this-providername-summary-response-leavi","errorCode":null,"errorMessage":"Empty ${this.providerName} summary response, leaving queue intact","messagePattern":"Empty (.+?) summary response, leaving queue intact","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/services/worker/OpenAICompatibleProvider.ts","lineNumber":391,"sourceCode":"    }\n    const summaryResponse = await this.query(session.conversationHistory, summaryConfig);\n\n    let tokensUsed = 0;\n    if (summaryResponse.content) {\n      // Appended once, by processAgentResponse below — see processObservationMessage.\n      tokensUsed = summaryResponse.tokensUsed || 0;\n      session.cumulativeInputTokens += Math.floor(tokensUsed * 0.7);\n      session.cumulativeOutputTokens += Math.floor(tokensUsed * 0.3);\n      session.lastUsage = this.buildLastUsage(summaryResponse);\n    }\n\n    if (summaryResponse.content || this.forwardEmptyMessageResponse) {\n      await processAgentResponse(\n        summaryResponse.content || '', session, this.dbManager, this.sessionManager,\n        worker, tokensUsed, originalTimestamp, this.providerName, lastCwd, summaryResponse.servedModel ?? summaryConfig.model, responseContext\n      );\n    } else {\n      logger.warn('SDK', `Empty ${this.providerName} summary response, leaving queue intact`, {\n        sessionId: session.sessionDbId\n      });\n    }\n  }\n\n  /**\n   * Map a classified provider failure onto the abortReason category that keeps\n   * buffered work alive.\n   *\n   * handleGeneratorExit finalizes the session — dropping whatever is buffered —\n   * for every category outside its preserve list. Quota was only ever set by\n   * the two PROACTIVE sites (the pre-request rate-limit guard and the\n   * observer-text heuristic), so a real 429 coming back from the provider left\n   * abortReason null and the session was torn down as if the failure were\n   * fatal (#3700). These conditions clear on their own; the work should still\n   * be there when they do.\n   */\n  private preservingAbortReason(error: ClassifiedProviderError): string | null {","sourceCodeStart":373,"sourceCodeEnd":409,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/d8bc9755e74915e5c3b999181e10a67c889bce2a/src/services/worker/OpenAICompatibleProvider.ts#L373-L409","documentation":"Same guard as the observation path but for summary messages: when the summary response has no content and forwardEmptyMessageResponse is false, processAgentResponse is skipped and the queued summary request is left intact. It stops empty summaries from wiping or corrupting session state.","triggerScenarios":"In processSummaryMessage (called from runMessageLoop), summaryResponse.content is empty while forwardEmptyMessageResponse is not enabled.","commonSituations":"Summarization model returning blank output (context overflow, content filter); upstream API degraded; wrong model configured for summarization.","solutions":["Check the summary model and prompt; try a model that reliably returns content.","Enable forwardEmptyMessageResponse if empty summaries are acceptable to forward.","Inspect the upstream finish reason / error fields in the raw response.","The queue entry remains intact — re-run the summary after fixing the upstream cause."],"exampleFix":"// before\nsummaryConfig = { model: \"min-model\" };\n// after\nsummaryConfig = { model: \"gpt-4o-mini\" }; // model that returns content reliably","handlingStrategy":"fallback","validationCode":"if (!summaryResponse?.content) {\n  // leave summary queue intact and retry later\n}","typeGuard":"const hasContent = (r: { content?: string | null }): r is { content: string } =>\n  typeof r.content === 'string' && r.content.trim().length > 0;","tryCatchPattern":"if (!hasContent(summaryResponse) && !provider.forwardEmptyMessageResponse) {\n  logger.warn('summary empty, will retry');\n}","preventionTips":["Use a proven model for summarization","Keep summary prompts within the model's context window","Monitor for repeated empty summaries indicating upstream degradation"],"tags":["empty-response","summary","queue"],"backgroundTag":"empty-api-response","analyzedSha":"d8bc9755e74915e5c3b999181e10a67c889bce2a","analyzedAt":"2026-09-17T16:40:26.182Z","contentChangedAt":"2026-09-17T16:40:26.182Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}