that feeling where you feel like you need to do something but can't remember what it is
You know when you feel like you need to do something but you can't remember what it is?
You almost feel a little anxious because you can't remember what you were going to do / what you need to do.
Is there a name for this feeling?
There is a term in cognitive psychology for this:
The doorway effect
From Michael Roizen, MD, answering at Sharecare:
Example: You walk across the room to get the newspaper. No problem. Walk through a doorway into another room to get it and -- zap! -- your memory is Windexed. You arrive clueless.
In Why Walking through a Doorway Makes You Forget, a Scientific American article by Charles B. Brenner and Jeffrey M. Zacks (December 13, 2011), some thoughts on what causes the doorway effect are discussed:
some forms of memory seem to be optimized to keep information ready-to-hand until its shelf life expires, and then purge that information in favor of new stuff. Radvansky and colleagues call this sort of memory representation an “event model,” and propose that walking through a doorway is a good time to purge your event models because whatever happened in the old room is likely to become less relevant now that you have changed venues.
The article discusses walking through a doorway as an example of that kind of event that can cause the mind to purge itself of less important memories. It goes on to say that, more generally...
Psychologists have known for a while that memory works best when the context during testing matches the context during learning
Further reading of the article says that experimental evidence suggests that, contrary to common expectations, returning to the place where the thought was originally formed (restoring the context) does not seem to restore the memory.