Smug know-all crossword clue. A big one crossword question in The Courier-Mail newspaper on Aug 9, 2017. 7 letters.
So that’s just one scenario, but there are several others. I’m less worried about the behavior of my friend (he knows about it and apologizes when he gets like that), but would like a concise way to describe it when it occurs.
I feel like it kinda falls somewhere around “smug know-it-all”, but that isn’t quite it. The smug part is correct, but the know-it-all is rather more like an idea formulated once by the party of concern then believed as gospel afterwards (they’ll defend it to the death, though a second before it wasn’t even a thought)