Another interpretation of (Isaiah 46:10): "Declaring the end from the beginning." The Holy One, blessed be He, told Moses, while he was still at the bush, what Pharaoh was destined to do. He said to him (Exodus 4:2-3): "What is this in your hand?" And he said, "A staff." And He said, "Cast it to the ground." And he cast it to the ground, and it became a serpent, and so forth. (Exodus 4:4) "And the LORD said to Moses, 'Put out your hand and grasp it by its tail,' and so forth," and it turned back and became a staff. The Holy One, blessed be He, said to him: Moses, just as the serpent twists itself, so Pharaoh is destined to twist himself against you. This is the meaning of "Declaring the end from the beginning." Rather, when he comes and says (Exodus 7:9), "Give for yourselves a wonder," just as I have done, so shall you do before him.
The Bending Snake That Foretold Pharaoh's Defiance at the Bush
Midrash Tanchuma Buber, Vaera 11:2
ד"א מגיד מראשית אחרית. הגיד הקב"ה למשה עד שהוא בסנה מה שפרעה עתיד לעשות, אמר לו משה מה זה בידך ויאמר מטה, ויאמר השליכהו ארצה וישליכהו ארצה ויהי לנחש וגו' (שמות ד ב ג), ויאמר ה' אל משה שלח ידך ואחוז בזנבו וגו' (שם שם ד), וחזר ונעשה מטה, א"ל הקב"ה משה כשם שהנחש מתעקם, כך פרעה עתיד להתעקם עליכם, הוי מגיד מראשית אחרית, אלא כשיבא ויאמר תנו לכם מופת, כשם שעשיתי כך עשו לפניו.