Does action cause karma or is it the thought behind the action?
Is karma caused by the action itself or by the thought behind the action?
Both are important. In the broad analysis of Dharma, the right thing to do, as we see in the Mahabharata, in the various deliberations, three factors are seen to be of relevance. The first is what we do, or the content of the action. The second is why we do it, or the intent of the action. And the third is what results from our action, or the effect of the action. These three can be summarized by the acronym ICE: Intent, Content, and Effect. And just as ICE can stop the flow of water, similarly, these three can be used to stop the impulsiveness of our actions and bring a greater degree of reflectiveness in our actions.
For example, if somebody kills someone, killing is bad, but if somebody kills accidentally while trying to defend themselves, then the intent may completely overshadow the actual content of the action, and that person may not be considered culpable at all. On the other hand, if someone acted to kill someone, then, depending on whether that was an impulsive action or a calculative action, it could be manslaughter or murder. What applies in general in normal law also applies with respect to karma. The principle of karma is logical; it is not diabolical, waiting to catch and trap us for factors that we do not know or are not in our control.
In general, the principle of karma is that we need to be reflective and responsible about our actions. So rather than getting caught too much in this or that, in terms of what will lead to greater culpability with respect to karma, we can focus more on the principle that if we are reflective and responsible, trying to act in the mood of service, to do our part in a larger whole, which ultimately means to do our part in a mode of service to the supreme whole that is Krishna, then we will be best situated to create an auspicious future for ourselves, irrespective of the technicalities of the specific choices that we may make during the course of our life.