⚡ Sangsakala Proxy 🏠 Home
Skip to content

session.metadata.getContextAttribution / getContextHeaviestMessages fail with "unknown variant memory" when memories are loaded #5325

Open

Description

@kjetiljd

Summary

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

Environment

Steps to reproduce

  1. Start a session with Copilot Memory enabled and memories loaded.
  2. From an extension, call session.rpc.metadata.getContextAttribution() after the first assistant message.
  3. 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions