From Geerhardus Vos’ Biblical Theology:
Jehovah’s omniscience finds expression in connection with his omnipresence, and His ability to predict things. Because He is everywhere, He knows whatever occurs. He declares unto man what is his (man’s) inward thought (Am. 4:13). Hosea says, “the iniquity of Ephraim is bound up, his sin laid up in store”. Every sin committed by the people is present before God ; it cannot be lost as little as money kept carefully in a bag (Hos. 13 :12). God’s eternity comes into play here also. Being before all that happens, He has been able to foretell many things that came to pass, and now challenges the pagan gods to measure themselves with Him in further predictions (Isa. 41:22-24; 43:9-13; 44:68). This implies that His foreknowledge is intimately connected with His purpose. It is no magical divination of uncertain contingencies, but the natural concomitant of His plan. “Jehovah does nothing, but He reveals His secret unto His servants, the prophets” (Am. 3 :7). It is in vain to seek to hide one’s counsel from Jehovah, as the politicians try to do, who work in the dark and say: who sees us, and who knows us? This is in vain, because Jehovah is in reference to all plotting of man as the potter is to the clay: He fashions the very mind that conceives the thought of hiding from Him. Man’s hiding from Jehovah is an object of Jehovah’s own purpose (Isa. 29:15,16).