Widget not restored when returning to a chat for sideloaded agents. Is this a store-only behaviour?

Patrick McLaughlin 0 Reputation points
2026-11-06T11:54:41.1366667+00:00

We build a declarative agent with a remote MCP server plugin whose tools return interactive widgets (MCP Apps). When a user leaves a Copilot chat and returns, the widget is gone and only the model's text remains. No widget-renderer iframe is in the DOM.

Agent Store agents behave differently, e.g. Figma. When invoked by @ mention, they re-render their widget from scratch when you return (spinner, then content). All three use openai-widget.html ("OAI Widget").

What we tested, all sideloaded, all losing the widget on return:

  • Our agent with _meta.ui.resourceUri only (renders in mcp-widget.html).
  • _meta["openai/outputTemplate"] only, with the resource served as text/html+skybridge (renders in openai-widget.html).
  • Both declared (Copilot used the MCP renderer).
  • Pinned tool definitions and dynamic tool discovery (run_for_functions: ["*"]).
  • A very small tool result, with widget data in _meta.
  • Saving state with window.openai.setWidgetState and localStorage. Both work, but there is nothing to restore into, since Adobe's widget reloads fresh.
  • Microsoft's own samples from microsoft/mcp-interactiveUI-samples (Trey Research, MCP Apps and OpenAI Apps SDK versions), sideloaded with Agents Toolkit. Both lose the widget on return.

Questions:

  1. Is widget replay on return a feature of Agent Store or admin-deployed agents, or does it also depend on something we can set (manifest field, tool _meta, result shape)?
  2. Does replay apply to widgets in the MCP Apps renderer (mcp-widget.html), or only the OpenAI one (openai-widget.html)? We haven't found a store agent on the MCP renderer to compare.
  3. Is there any way to get replay for a sideloaded or organisation-deployed agent?

We found nothing on this in the MCP apps docs, the troubleshooting page or the known-issues list. Thanks!

Microsoft Copilot | Microsoft 365 Copilot | Development
0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.