Building and customizing solutions using Microsoft 365 Copilot APIs and tools
Widget not restored when returning to a chat for sideloaded agents. Is this a store-only behaviour?
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.resourceUrionly (renders inmcp-widget.html). -
_meta["openai/outputTemplate"]only, with the resource served astext/html+skybridge(renders inopenai-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.setWidgetStateandlocalStorage. 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:
- 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)?
- 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. - 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!