Note
🤖 Claude Opus 5.5 reported on behalf of NikitaMGrimm
Another reproduction on the desktop path, where the impact is losing a site's login.
Environment: Windows 11, T3 Code 0.1.7-nightly.20261102 (my fork's build; same tab.desktop.close() close path as main at b7ab02e0f607), serverPageMode: native, default profile.
Test on example.com: I registered beforeunload, pagehide, unload and visibilitychange listeners that each write a localStorage key.
| Action | Keys written by the listeners | Key set before the action |
|---|---|---|
| Navigate the tab | All four | n/a |
t3_preview_close, then reopen | None | Still there |
So the events either don't fire or their writes never land. I didn't test closing a tab by hand from the UI.
Impact: a signed-in Discord tab stayed signed in across navigation. After t3_preview_close, reopening Discord showed "Please log in again": the token localStorage key was gone, while the account's entry in MultiAccountStore remained. I believe Discord writes its token back during unload, but I haven't confirmed that.
This matters for agents in particular, because they're told to close the tabs they open, and the close reports success. The user finds out at their next visit.
#23537 only changes the headless branch, so this path stays as it is. Should desktop tabs run unload handlers on close too?