You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
session.metadata.getContextAttribution / getContextHeaviestMessages fail with "unknown variant memory" when memories are loaded #5325
Extensions calling session.rpc.metadata.getContextAttribution() or getContextHeaviestMessages() get an error in a session where Copilot Memory is loaded (a <memories> block is present). A snapshot taken at startup, before any messages existed, succeeded in the same session.
Error
Request session.metadata.getContextAttribution failed with message: unknown variant `memory`, expected one of `skill`, `subagent`, `mcp`, `tool` at line 1 column 17
Request session.metadata.getContextHeaviestMessages failed with message: unknown variant `memory`, expected one of `skill`, `subagent`, `mcp`, `tool` at line 1 column 17
Start a session with Copilot Memory enabled and memories loaded.
From an extension, call session.rpc.metadata.getContextAttribution() after the first assistant message.
Call session.connection.sendRequest("session.metadata.getContextAttribution", { sessionId }) directly. It fails identically, so the typed SDK wrapper is not the cause.
Expected
The calls return entries, as the SDK docs say: entry kind is "not a closed set, tolerate unknown values".
Actual
Both RPC calls fail, so extensions cannot read context attribution while memories are loaded.
Notes
The accepted list in the error (skill, subagent, mcp, tool) differs from the documented entry kinds (skill, subagent, mcpServer, tool, system, toolDefinition, plugin). It looks like a separate, narrower source enum that does not yet include memory, possibly a rollout in progress.
The error format (at line 1 column 17) looks like a serde-style deserialization error.
Running /context directly in the same session did not show the error.
I found no mention of a fix in 1.0.106-1 or 1.0.106-2 release notes, and no existing issue matching this error.
Activity