Avos transmit daas to future generations
Avraham · penimiyus · Avos · holy sparks · Sedom
פי' אמו"ז ז"ל ע"פ כי ידעתיו למען אשר יצוה כי השי"ת נתן לו דיעה ודביקות שיהי' בכחו לצוות ולהניח לכל בנ"י אחריו וזהו פי' למען כפשוטו כנ"ל.
My grandfather, may his memory be a blessing, explained the verse "for I have known him, so that he will command" (Bereishis 18:19): that Hashem gave him a knowing and a deveikus (cleaving) such that he had the power to command and to bequeath it to all of Bnei Yisrael after him; and this is the plain meaning of "so that," as above.
The Sefas Emes brings his grandfather's reading: Avraham was granted both knowledge of Hashem and an attachment to Him so deep that it could be transmitted as an inheritance to all his descendants. "So that he will command" means Avraham was empowered to pass this connection down the generations.
והענין הוא כי הדורות נמשכין זה אחר זה והאבות הם הראשים והדעת של בנ"י קיבלו האבות בעבור דורות האחרונים שהם כגופות לגבי הארות האבות שהם נשמות לכן נקראו אבות.
And the matter is that the generations are drawn one after another, and the Avos are the heads; the daas (knowing of Hashem) of Bnei Yisrael was received by the Avos on behalf of the later generations, who are like bodies in relation to the illuminations of the Avos, which are like souls — and therefore they are called "Avos" (fathers).
The Avos function as the "head" of the body of Klal Yisrael. The spiritual light they received was held in trust for all later generations: the Avos are the soul, the later generations the body that the soul animates — which is why they are called "fathers," the source of life for those that follow.
וזהו עצמו הטעם כיון שפנימיות הדעת ניתן לאברהם והוא שרש וחיות הכל ממילא אין לכסות ממנו דבר.
And this itself is the reason: since the penimiyus (innermost dimension) of the daas was given to Avraham, and he is the root and the life-force of everything, it follows that nothing can be hidden from him.
Here is why Hashem says He will not conceal from Avraham what He plans for Sedom: since the inner core of Divine knowledge was placed in Avraham, and he is the root and vitality of the entire body of his descendants, nothing within that body can be concealed from its own root.
והיינו שהי' נצרך להוציא הכחות של הקדושה שנמצא בסדום והוא עצמו הצלת לוט שבא ממנו דהמע"ה ומלך המשיח כי הכל בעבור בנ"י נבראו א"כ צריך הצדיק לידע מפלת הרשעים להוציא בלעם מתוך פיהם כנ"ל:
And this means that it was necessary to extract the forces of kedushah (holiness) found in Sedom — and this itself is the rescue of Lot, from whom came Dovid HaMelech and Melech HaMashiach; for everything was created for the sake of Bnei Yisrael. Therefore the tzaddik must know of the downfall of the wicked, in order to draw out the "swallowed-up" holiness from within them, as above.
Avraham had to be told of Sedom's fate because hidden within that wicked city were holy sparks that needed to be salvaged — embodied in the rescue of Lot, the ancestor of Dovid HaMelech and ultimately Mashiach. Since all of creation exists for Bnei Yisrael, the tzaddik must be aware of the wicked even as they fall, so that he can rescue the nitzotzos (holy sparks) trapped within them before they are lost.
Summary: Avraham was given the penimiyus of daas Hashem and a deveikus deep enough to bequeath to all later generations, making the Avos the "soul" and head of Klal Yisrael. Because Avraham is the root and life-force of all his descendants, nothing could be hidden from him — including Sedom's fate, since the tzaddik must know of the downfall of the wicked in order to extract the holy sparks concealed within them, such as the rescue of Lot from whom Dovid HaMelech and Mashiach descend.