What this feeling usually is

Walking into a room and suddenly forgetting why you went there is such a common experience that it has a well-documented explanation, sometimes called the doorway effect. It's not usually a sign of memory problems. It's a quirk of how short-term memory is organized around context.

Common lifestyle causes

What's happening in the body

Short-term memory has limited capacity and tends to organize information around context. When you cross a boundary, like walking through a doorway into a new room, the brain treats it as a shift to a new context and can "close the file" on the previous one, including whatever intention was tied to it. This has been studied specifically and is sometimes called the doorway effect. It's a normal feature of how memory is organized, not a sign that memory itself is failing, which is part of why the forgotten intention often comes right back once you return to the original room or context.

General suggestions that may help

When to consider seeing a doctor

The doorway effect on its own is a normal, well-documented memory quirk and not a concern. It's worth talking to a healthcare professional if forgetfulness is broader than this specific pattern, is worsening, or is paired with other new changes in memory or thinking.