I find that if I learn to laugh when I have these little moments, then it helps everyone. Usually, when people point out to me these little moments, they either forget I'm autistic or they don't know. So, I heave learned to educate people that I do tend to take things literally. Usually, in my case, someone will ask me something when I'm focusing on other things and they ask me soemthing or tell me to do something and distractedly I answer literally. It takes a few more minutes for me to think it out and figure out what they actually mean.
People I work closely with have learned that if I answer quickly and literally, it usually means that I'm not focusing on them. My boss asks me if that's my final answer or if I want to take a few minutes to think about it before he starts laughing. This has the added bonus of making me focus on him and what he's asking. I'm pretty good natured and don't get ruffled by my "autistic moments" much anymore. At least I try not to. What still upsets me is when something throws me into a meltdown and I can't control my reaction. I can't figure out how to get past meltdowns and make fun of them until MUCH later.
_________________
"All those things that you taught me to fear
I've got them in my garden now
And you're not welcome here" ---Poe