Sridhara Swami's Commentary
Showing the mysterious intricacies of action and inaction is being delineated by Lord Krishna. One who sees inactions in actions such as yagna or the worship of the Supreme Lord and who sees that such worship is actually non-action as it leads to knowledge and having no reactions does not bind one to material existence. This person understands. Similarly one who sees action in inaction such as the non-performance of prescribed activities such as Ekadasi vrata or completely abstaining from all grains on the 11th day of the waxing moon and waning moon when not performed results in sinful reactions and binds one to material existence and who sees that such abstention is actually action within inaction is properly situated. Lord Krishna actually praises such a person as being of superior intelligence by dint of their comprehension and subsequent application of this esoteric subject matter. The word yuktah means yogi or one dedicated to the science of the individual consciousness in communion with the ultimate consciousness. This verse verifies previous verse II.XXXXVI with actions offered to the Lord, verse III.IV by not performing actions and verse III.XVII the redundance of action once moksa or liberation is achieved.
In action even when the body and senses are active one who realises the atma or soul is distinct from the physical body sees these actions as inaction. Contrarily one who is void of knowledge sees action as inaction due to avoiding actions because they are troublesome and difficult, for this person the non-performance of action is hypocritical as revealed in verse III.VI and is an obstruction to knowledge.
The performer of actions situated in knowledge of the atma observes the performance of Vedic activities naturally in action and inaction as they come of their own accord. So thus being guided by the atma within there is no scope or possibility for such a person to perform a prohibited act or to not perform prescribed acts as they come of their own accord. Thus it should be noted that the nature of prohibited actions is included as well.