This is what Scripture says: "I call to God Most High, to God who fulfills for me" (Psalms 57:3). Rabbi Yehoshua said: Three things the court below decreed and the Holy One, blessed be He, agreed from above, and these are they. One, in the days of Ezra: when Israel came up from Babylon, the Holy One, blessed be He, wished to release them from the tithes; what did they do? They imposed the tithes upon themselves, as it is said, "And our dough offerings and our heave offerings and the fruit of every tree" (Nehemiah 10:38). What did they do? They wrote it in a document and placed it in the sanctuary. The next day they entered and found it sealed, as it is said, "And because of all this we make a firm covenant and write it, and upon the sealed document" (Nehemiah 10:1). And one in the days of Mordecai, as it is written, "The Jews confirmed and accepted" (Esther 9:27): they confirmed above what they accepted below. And one in the days of Joshua, when they entered the land: Joshua said, "The city shall be devoted" (Joshua 6:17), and we do not find that the Holy One, blessed be He, told him so. And how do we know He agreed by his hand? As it is said, "Israel has sinned and also transgressed My covenant" (Joshua 7:11). And so too Jacob: when his sons came in for blessing he began to apportion gifts to them. And how do we know the Holy One, blessed be He, agreed by his hand? You find that the blessings with which Jacob blessed them, He blessed them from the mouth of the Almighty. And some say, even the greeting of peace in the Name, as it is said, "And behold, Boaz came from Bethlehem and said to the reapers, The LORD be with you" (Ruth 2:4). And how do we know the Holy One, blessed be He, agreed by his hand? As it is said, "The LORD is with you, mighty man of valor" (Judges 6:12).
Three Decrees the Court Below Made and Heaven Confirmed
Yalkut Shimoni on Nach 18:1
זהו שאמר הכתוב אקרא לאלקים עליון לאל גומר עלי (תהלים נז, ג). אמר רבי יהושע שלשה דברים גזרו בית דין של מטה והסכים הקב"ה מלמעלה ואלו הם, אחד בימי עזרא כשעלו ישראל מבבל בקש הקב"ה להתיר להם את המעשרות מה עשו גזרו על עצמם שיהיו מעשרין שנאמר ואת עריסותינו ותרומותינו ופרי כל עץ וגו' מה עשו כתבו בספר ונתנו אותו בהיכל, למחר נכנסו ומצאו אותו חתום שנאמר ובכל זאת אנחנו כורתים אמנה וכותבים ועל החתום. ואחת בימי מרדכי דכתיב קימו וקבלו היהודים קיימו למעלה מה שקבלו למטה. ואחת בימי יהושע בשעה שנכנסו לארץ אמר לו יהושע והיתה העיר חרם ולא מצינו שא"ל הקב"ה ומנין שהסכים הקב"ה על ידו שנאמר חטא ישראל וגם עברו ברית. וכן יעקב כשנכנסו בניו לברכה התחיל מחלק להם פרוקופות. ומנין שהסכים הקב"ה על ידו אתה מוצא שברכות שברך יעקב ברכן מפי הגבורה. וי"א אף שאלת שלום בשם. שנאמר והנה בועז בא מבית לחם ויאמר לקוצרים ה' עמכם ומנין שהסכים הקב"ה על ידו שנאמר ה' עמך גבור החיל: