How do I know when the devil is behind my thoughts?
Number one, you have to diagnose it. When you feel anger, agitation, discomfort, or pride in your soul, when you're not feeling peaceful and you feel uneasy, unrest, uncertainty, know that the devil is whispering. It is always the byproduct of demonic energy. This is why St Silouan the Athonite was so clear: never talk to demons. People misunderstand this and think a demon is going to appear and talk to them.
That happens sometimes in the lives of saints, but for the vast majority of us, he's referring to when the whispering starts and the wheels in our head start turning, and we begin a dialogue in our mind with the thoughts that are coming in. We think we're playing checkers. The devil is playing chess. He is so many moves ahead that every time we present an answer to one thought, he immediately throws another thought we didn't see coming, and we're chasing thought after thought after thought.
St Silouan also said that if a thought causes us agitation, we are free to leave it and find a new thought. God does not want our souls to be agitated, angry, or unpeaceful. He does not expect us to be tormented, and he is not tormenting us. So if our thoughts are shaping our soul into uneasiness, we are free to stop that at any time, go back to the drawing board, and start to dismantle it.

