Resetting „stuck“ Safari iCloud synchronized tabs
This isn‘t a question, but a tip for the community. I have been battling the stuck iCloud synchronized tabs problem in Safari on my devices (Macs, iPhone, iPad) and discovered the following trick.
Note that I can confirm that this works on Monterey, I have not tried it on any other version of MacOS.
Execute the following command in a terminal window. Note that you may have to give terminal full drive access in the security control panel (and don‘t forget to remove it when you are done).
rm $HOME/Library/Containers/com.apple.Safari/Data/Library/Safari/CloudTabs.db*
You should terminate all your Safari sessions on all of your devices (Quit on Mac, „Swipe Terminate“ on iOS/iPadOS devices) before executing the command. Once the command is executed, all your tabs will be gone. New ones should now appear correctly (and disappear correctly as well).
If you multiple Macs I have found it only necessary to do this on one. Your milage may vary.
Mac mini 2018 or later