Reproducible on web ChatGPT:
-
User sends a prompt that triggers an MCP tool returning a widget (e.g., a hotel search). Server polls upstream API (~10s).
-
Before the first widget renders, user sends a second prompt that chains another tool (e.g., “book the first room”).
-
Both tool calls complete successfully on the server.
Observed:
-
First widget appears in chat but the SDK fails to load its HTML template — browser console shows
404on/backend-api/ecosystem/widget?...&template_pointer=ui://widget/<our>.html&resource_path=.... -
Red error “Stopped talking to App — Error loading app — Failed to fetch template” appears with a Retry button.
-
Host indicator “Searching …” stays suspended forever for the first turn —
openai/toolInvocation/invokednever transitions, even though the tool returned successfully. -
Second widget (chained tool) loads correctly. Chat history shows the first card permanently broken alongside the second functional one.
Workaround in place: the official window.openai.requestClose() API, called from our boot via a short timer when no payload arrives, successfully dismisses the orphan when our JS runs. It does not address the cases where our JS never executes due to the failed template fetch.
Unresolved: the template-fetch 404, the “Failed to fetch template” UI error, and the stuck “Searching …” indicator — all host-side.
NB: This issue triggers only and exclusively at the first widget boot, when a second prompt is sent while the first one is still loading.
Thanks a lot for your help guys!!!