[(Numbers 13:2:) SEND MEN FOR YOURSELF.] When they said to Moses (in Deuteronomy 1:22), "Let us send men," Moses began standing and wondering. He said: It is impossible for me to do anything until I take counsel with the Holy One, blessed be He. He went and took counsel. He said to Him: Such-and-such Your children are requesting. The Holy One, blessed be He, said to him: This is not the beginning for them. While they were in Egypt they mocked Me, as it is said (Hosea 7:16), "This was their derision in the land of Egypt." They are accustomed to this. I have no need, as it is said (Daniel 2:22), "He knows what is in the darkness, etc." The Holy One, blessed be He, said to Moses: I know what they are [saying]; but if you wish, send [men for yourself], for your own sake. From where? As it is written (Numbers 13:16), "These are the names of the men whom Moses sent to spy out the land."
Moses Consults God Before Sending the Spies to Canaan
Midrash Tanchuma Buber, Sh'lach 8:1
[שלח לך אנשים]. כיון שאמרו למשה נשלחה אנשים, התחיל משה עומד ותוהא, אמר אי אפשר לי לעשות דבר עד שאמלך בהקב"ה, הלך ונמלך, א"ל כך וכך מבקשים בניך, א"ל הקב"ה אין זה תחילה להם, עד שהיו במצרים הלעיגו לי, שנאמר זו לעגם בארץ מצרים (הושע ז טז), למודים הם לכך, אני איני צריך, שנאמר ידע מה בחשוכא וגו' (דניאל ב כב), א"ל הקב"ה למשה יודע אני מה הם [אומרים], אלא אם בקשת שלח [לך אנשים, לך] לעצמך, מנין שכתיב אלה שמות האנשים אשר שלח משה לתור את הארץ (במדבר יג טז).