system sounds coming from thunderbolt display, all else through headphones
Under "Sound Effects" tab, change "Play sound effects through:"

Instead of automatically changing this option, when I plug in headphones this setting remains unchanged.