setWidgetState does not work on Android

I tried to write a demo, and the demo content is quite simple. The MCP service retrieves a string and displays it, then edits the string and saves it to window.openai.widgetState. The content area above displays the current widgetState content. On both the PC web and iOS platforms, it works correctly. After refreshing the page, it can properly retrieve the content previously saved to widgetState. However, on the Android platform, it does not work properly, and widgetState always retains the value from when the page was first entered.

I suspect that the issue lies in the Android platform, where after window.openai.setWidgetState sets a value, it is not correctly passed upwards (from iframe/webview to the host container) and the received value is not properly persisted.

Below is the page’s code logicI tried to write a demo, and the demo content is quite simple. The MCP service retrieves a string and displays it, then edits the string and saves it to `window.openai.widgetState`. The content area above displays the current `widgetState` content. On both the PC web and iOS platforms, it works correctly. After refreshing the page, it can properly retrieve the content previously saved to `widgetState`. However, on the Android platform, it does not work properly, and `widgetState` always retains the value from when the page was first entered.
I suspect that the issue lies in the Android platform, where after `window.openai.setWidgetState` sets a value, it is not correctly passed upwards (from iframe/webview to the host container) and the received value is not properly persisted.

Below is the page’s code logic


Does anyone know why?