When I launch /Applications/kitty.app from Spotlight, my set_tab_title mapping does not work. The screen and OS window title flash, and are immediately restored to whatever they where before. When I launch kitty from inside itself with kitty (/Applications/kitty.app/Contents/Frameworks/kitty/kitty/launcher/kitty), or if I launch it from Terminal.app with open /Applications/kitty.app or open -a kitty, set_tab_title works as expected.
This is weird and I don't know how to debug it. Any ideas? Whatever set_tab_title does seems unrelated to how Kitty was started.