We have two types of thoughts:
1- Thoughts that concern one’s belief. For instance, if one thinks God is unjust. Yes this is a sin and one will be held accountable for it.
2- Thoughts about committing a sin. As long as the person doesn’t commit the actual sin, then he won’t be held responsible for his thoughts.