How do I stop assuming that someone is male? Consider the following situation. I'm talking to a friend who says "One of my friends is a student of so-and-so,", and I immediately ask, "Oh, what's his name?", before being told "'her name', actually, is Alice."

How do I stop doing that? The underlying problem I want to fix is the bias in my own head -- I'm not just looking to fix the problem by replacing "his name" with "their name" in my question. I would hope that sufficiently many episodes like this would be enough to fix it eventually, but I fear that there are too many situations of the other kind, wherein I ask "What's his name?" and get "Bob", for my subconscious to ever fully absorb it.

Regardless, my question is this: are there any concrete, actionable things I could be doing to get rid of the bias in my head?

I'm not sure how much my own gender is relevant, which I'd like to keep hidden to encourage broader answers.

I'm also aware that this question isn't strictly academia-related, but it is worth pointing out that this only happens to me in an academic (possibly field-specific) setting, i.e. if told "One of my friends recommended this book to me," I am fairly sure I would respond "Oh, what's their name?".

Edits, for more detail: I work in a male-dominated field, and I think/speak primarily in American English.
Is your academic field male-dominated? I imagine that this is what might encourage you to make these assumptions, if you do not make them in other areas of your life.

For me the main thing was to try to systematically use gender-neutral pronouns, in writing and in speech. Training yourself to do this forces you to confront your bias, and eventually this should become a habit. You will also notice such assumptions made by other people, especially in papers.

This being said, if you are aware of the problem and of these assumptions, you are probably already halfway there. :)