A person will not be accountable for stray thoughts
Q: Is it really so that our evil thoughts are forgiven so long as we don't bring them in action because of the hadith in bukhari narrated by Abu Huraira (radhiyallahu anhu):
The Prophet (sallallahu alaihi wasallam) said, "Allah has forgiven my followers the evil thoughts that occur to their minds, as long as such thoughts are not put into action or uttered." And Qatada (radhiyallahu anhu) said, "If someone divorces his wife just in his mind, such an unuttered divorce has no effect." Sahih al bukhari hadith no 5269