A nice example of the all-cognizant quality of the Lord is described in Srimad-Bhagavatam, First Canto, Fifteenth Chapter, verse 11, in connection with Durvasa Muni’s visit to the house of the Pandavas in the forest. Following a calculated plan, Duryodhana sent Durvasa Muni and his ten thousand disciples to be guests of the Pandavas in the forest. Duryodhana arranged for Durvasa and his men to reach the place of the Pandavas just when the Pandavas’ lunchtime ended, so that the Pandavas would be caught without sufficient means to feed such a large number of guests. Knowing Duryodhana’s plan, Krsna came to the Pandavas and asked their wife, Draupadi, if there were any remnants of food which she could offer to Him. Draupadi offered Him a container in which there was only a little fragment of some vegetable preparation, and Krsna at once ate it. At that moment all of the sages accompanying Durvasa were taking bath in the river, and when Krsna felt satisfaction from eating Draupadi’s offering, they also felt satisfaction, and their hunger was gone. Because Durvasa and his men were unable to eat anything more, they went away without coming into the house of the Pandavas. In this way the Pandavas were saved from the wrath of Durvasa.
Duryodhana had sent them because he knew that since the Pandavas would not be able to receive such a large number, Durvasa would become angry, and the Pandavas would be cursed. But Krsna saved them from this calamity by His trick and by His all-cognizant quality.