{"record":{"id":"d44c2602ff6f74d6","repo":"CopilotKit/CopilotKit","slug":"channel-memory-unavailable","errorCode":"channel_memory_unavailable","errorMessage":"Channel Memory requires an attached Intelligence Runtime","messagePattern":"Channel Memory requires an attached Intelligence Runtime","errorType":"error_code","errorClass":"ChannelMemoryUnavailableError","httpStatus":null,"severity":"error","filePath":"packages/channels-core/src/thread.ts","lineNumber":655,"sourceCode":"    if (requested === undefined) return undefined;\n    const grant = resolveMemoryGrant(requested);\n    if (!hasMemoryAccess(grant)) return undefined;\n    if (grant.user !== \"none\" && user === null) {\n      throw new ChannelMemoryUserRequiredError();\n    }\n    this.assertMemoryAvailable();\n    return Object.freeze({\n      grant,\n      user: grant.user === \"none\" ? null : user,\n    });\n  }\n\n  private assertMemoryAvailable(): void {\n    if (\n      this.deps.intelligenceMemoryAvailable !== true &&\n      this.deps.adapter.supportsIntelligenceMemory !== true\n    ) {\n      throw new ChannelMemoryUnavailableError();\n    }\n  }\n\n  private async run(\n    initialResume?: { resume: unknown },\n    extra?: {\n      context?: ContextEntry[];\n      tools?: ChannelTool[];\n      prompt?: string | AgentContentPart[];\n      transcript?: boolean | { limit?: number };\n      memory?: ResolvedChannelMemory;\n    },\n  ): Promise<MessageRef | undefined> {\n    const session = await this.deps.adapter.conversationStore.getOrCreate(\n      this.deps.conversationKey,\n      this.deps.replyTarget,\n      this.deps.agentFactory,\n    );","sourceCodeStart":637,"sourceCodeEnd":673,"githubUrl":"https://github.com/CopilotKit/CopilotKit/blob/68fbe97d87420bd84e8196965c71bd6e394a3f7a/packages/channels-core/src/thread.ts#L637-L673","documentation":"Channel Memory is only available when an Intelligence Runtime is attached — signaled by deps.intelligenceMemoryAvailable or the adapter advertising supportsIntelligenceMemory. If neither is true, any memory grant request throws ChannelMemoryUnavailableError (code channel_memory_unavailable) before resolution proceeds.","triggerScenarios":"Requesting memory options on a channel whose runner never enabled Intelligence memory (no ɵruntime.enableIntelligenceMemory()) and whose adapter does not support it natively.","commonSituations":"Running without the Intelligence runtime (self-hosted minimal setup); adapter versions predating Intelligence support; forgetting to register the Intelligence adapter/module in the runner.","solutions":["Attach/enable the Intelligence runtime for the channel (register its adapter, or call channel.ɵruntime.enableIntelligenceMemory() when wiring it)","Upgrade the platform adapter to a version with supportsIntelligenceMemory","Remove memory options if Intelligence Memory is not part of your deployment"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"const memoryAvailable =\n  adapter.supportsIntelligenceMemory === true; // or track enableIntelligenceMemory()\nif (!memoryAvailable) delete options.memory;","typeGuard":null,"tryCatchPattern":"try {\n  const mem = thread.memory?.(grant);\n} catch (e) {\n  if ((e as { code?: string }).code === \"channel_memory_unavailable\") {\n    // proceed without memory\n  }\n  throw e;\n}","preventionTips":["Enable/attach the Intelligence runtime in your runner setup","Feature-flag memory options off when Intelligence is not deployed"],"tags":["memory","intelligence","runtime","unavailable"],"backgroundTag":"optional-feature-not-enabled","analyzedSha":"68fbe97d87420bd84e8196965c71bd6e394a3f7a","analyzedAt":"2026-08-27T04:03:26.537Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}