The Screwtape Letters raises the interesting question about how much the devils know about our thoughts and what we will do. Here is the analysis from writing attributed to the Fourth Century Syrian monk, St. Macarius the Great of Egypt...
If one man is with another person and knows things concerning him, and if you, twenty years old, know things concerning your neighbour, can Satan, who has been with you from birth, not know your thoughts? For he is already many years old. Still we do not say that before he tempts he knows what man will intend to do. For the tempter tempts, but he does not know whether a person will obey him or not until one gives up his will as a slave. Neither again do we maintain that the devil knows all the thoughts of a person’s heart and its desires. Like a tree, it has many branches and limbs. So the soul has certain branches of thoughts and plans and Satan grasps some of them. There are other thoughts and intentions that are not grasped by Satan.
For in one matter the side of evil takes an upper hand in thoughts that arise. In another matter, again, the thought of man is superior as he receives help and deliverance from God and he resists the evil. In one thing he is overcome and in another he has his will. For sometimes he comes to God with fervor and Satan knows this and sees that man is repelling him and that he is incapable of restraining him. Why is this? Because a person has the desire to cry out to God. He has the natural fruits of loving God, of believing him, of seeking him and coming to him.
Excerpt taken from the book: Pseudo-Macarius, The Fifty Spiritual Homilies & the Great Letter