Sometimes, when someone (including friends and family) is speaking to me, I think, "what a dumbass, you're a f**king idiot," even if what they're saying is well thought out. This is not a reason-based thought. I don't have much control over it, it just happens because it can, like if I tell you not to think of an elephant, you most likely just did. Since I only have these thoughts because they are possible to have, I usually feel bad for my friends, perhaps because they are happy and unaware of this passive thought, and also because it usually isn't true.
Don't worry I do that all the time too. They sometimes really p*ss me off just for being themselves... But that might just be me. LOL.
I do the exact same thing, so don't worry. The more you try to stop it, the worse it becomes!