For the last several weeks, possibly since I updated to macOS 14 (but I think more recently than that), my MBP has been experiencing these periodic hangs in UI responsiveness. Every once in a while (sometimes every 10 seconds, sometimes I don't notice it for minutes or hours), the UI will stop responding for a few seconds. Often not long enough for the rainbow cursor to appear, but it frequently does.

The beachball never lasts long. Sometimes it's just text won't appear as I'm typing for a few seconds. Sometimes I'll get a beachball when copying or pasting, or dragging something.

It happens in all apps. I usually notice it in Safari, Messages, and Xcode, but those are probably my most-used apps.

Restarting seems to fix it, then a day or two later the behavior resumes.

I've tried initiating Spindumps when I notice it, hoping it will happen before the spindump completes. I did catch one freeze once, but don't know enough about analyzing the dumps to see anything that's a likely culprit.

Any ideas for how to diagnose this? I've already filed feedback with Apple, but I doubt they'll even look at it.