Lama Ole’s answer:
There are two explanations for this. With short déjà vus that make little sense or are not related to anything, our consciousness gets the same message from two different channels: through the intuitive way of directly knowing, and a split second later through the different brain centers that also process the same impressions. This is then experienced as a sudden déjà vu.
But if you recognize the circumstances and places as a whole and you know what will happen next, then perhaps you aren’t completely within linear awareness with past and present, but a bit outside of this stream.
Consciousness can be seen as a limitless ocean or space. And in this space, past, present, and future run their course like streams or lines. And just as a wave or a stream in its essence is not different from the ocean, in the same way one can step out of this linear stream, which originated from personal attachment and expectations. This can be done through feelings like devotion or the wish for others to be happy. Then through the vibration of your molecules, through the space between your molecules, through the energy and clarity of your mind, you are connected to all things. This then is your constant experience, and suddenly your sense impressions plug into it too. You can easily see things that will come or have happened. I do this often when making divinations.
Some people also have this while dreaming. I would simply be happy about it if it is there—see it as interesting and go on cheerfully. As long as you cannot control this ability, it’s not possible to work with it. Only once you can hold and control it is it great.