CopilotKit/CopilotKit · error · ChannelMemoryUnavailableError
channel_memory_unavailable
channel_memory_unavailable
Error message
Channel Memory requires an attached Intelligence Runtime
What it means
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.
Source
Thrown at packages/channels-core/src/thread.ts:655
if (requested === undefined) return undefined;
const grant = resolveMemoryGrant(requested);
if (!hasMemoryAccess(grant)) return undefined;
if (grant.user !== "none" && user === null) {
throw new ChannelMemoryUserRequiredError();
}
this.assertMemoryAvailable();
return Object.freeze({
grant,
user: grant.user === "none" ? null : user,
});
}
private assertMemoryAvailable(): void {
if (
this.deps.intelligenceMemoryAvailable !== true &&
this.deps.adapter.supportsIntelligenceMemory !== true
) {
throw new ChannelMemoryUnavailableError();
}
}
private async run(
initialResume?: { resume: unknown },
extra?: {
context?: ContextEntry[];
tools?: ChannelTool[];
prompt?: string | AgentContentPart[];
transcript?: boolean | { limit?: number };
memory?: ResolvedChannelMemory;
},
): Promise<MessageRef | undefined> {
const session = await this.deps.adapter.conversationStore.getOrCreate(
this.deps.conversationKey,
this.deps.replyTarget,
this.deps.agentFactory,
);View on GitHub (pinned to 68fbe97d87)
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
Defensive patterns
Strategy: try-catch
Validate before calling
const memoryAvailable = adapter.supportsIntelligenceMemory === true; // or track enableIntelligenceMemory() if (!memoryAvailable) delete options.memory;
Try / catch
try {
const mem = thread.memory?.(grant);
} catch (e) {
if ((e as { code?: string }).code === "channel_memory_unavailable") {
// proceed without memory
}
throw e;
} Prevention
- Enable/attach the Intelligence runtime in your runner setup
- Feature-flag memory options off when Intelligence is not deployed
When it happens
Trigger: Requesting memory options on a channel whose runner never enabled Intelligence memory (no ɵruntime.enableIntelligenceMemory()) and whose adapter does not support it natively.
Common situations: Running without the Intelligence runtime (self-hosted minimal setup); adapter versions predating Intelligence support; forgetting to register the Intelligence adapter/module in the runner.
Related errors
- Intelligence Runtime `memory.access` must be a callback
- Intelligence Runtime web `memory` requires `identifyUser`
- channel "${opts.name ?? "(unnamed)"}" failed to start its ma
- channel_memory_grant_invalid
- channel_memory_subject_required
AI-assisted analysis of CopilotKit/CopilotKit@68fbe97d87 (2026-08-27).
Data as JSON: /api/errors/d44c2602ff6f74d6.
Report an issue: GitHub.