कायेन कुरुते पापं मनसा सम्प्रधार्य च । अनृतं जिह्वया चाह त्रिविधं कर्मपातकम् ॥

श्रीमद्वाल्मीकिरामायणे अयोध्याकाण्डे नवोत्तरशततमस्सर्गः (२१ श्लोक)

While replying to Jabali maharshi, ShriRaama spoke these golden words:

“When a human does a Paapa-karyam (sin), in addition to its adverse effect, he has to bear two more sins. One that committed with his manas (mind) because of planning and thinking about the sin, and the other committed by his speech because of making false statements for supporting the sin. Thus the adverse effect of any sin becomes three-folds!”

Hence once should be very careful and restrain even from adharmic thoughts. If by mistake an adharmic thought comes to mind, one should cut it at that stage itself and restrict it from transforming itself into speech and action. Also, to cleanse the sin of that adharmic thought, one should perform daiva-smarana. A karma will get trikarana-shuddhi only if it is dharmic by thought, speech and action simultaneously. And any such karma, like the ones done by Arjuna, will be accepted by God as His Pooja!