“The LORD said, “Shall I hide from Abraham what I am about to do, since Abraham will surely become a great and mighty nation, and in him all the nations of the earth will be blessed? “For I have chosen him, so that he may command his children and his household after him to keep the way of the LORD by doing righteousness and justice, so that the LORD may bring upon Abraham what He has spoken about him.”” Gen. 18:17-19
Here we see some rare insight into God’s thoughts. God is essentially weighing whether he should reveal His plans for Sodom and Gomorrah to Abraham. He reflects on His covenant with Abraham – not only His promises, but also what He has called Abraham to do in return – justice and righteousness, which is mentioned as a contingency, as it reads “…so that the LORD may bring upon Abraham what He has spoken about him.“
What stands out the most to me in this passage is the phrase “…so that he may command his children and his household after him to keep the way of the LORD“. There is an emphasis here not just on right living, but on ensuring that right living and belief in God is handed down to the next generation. After all, why would God bring about His promises of countless descendants and the giving of land to a people who fell away and no longer believed in or followed Him? God would not be obligated as it was a conditional promise.
We can see that in the case of Adam, it only took one generation for wickedness and unbelief to set in, as Cain murdered his brother Abel. We can see that although Noah was a righteous man, as were his sons Shem and Japheth, something went awry with his son Ham and his grandson Canaan. Another son of Ham was Cush, and after Cush came Nimrod, whom was believed to be the brainchild of the Tower of Babel. The generational link is key, and so God mentions that here.
Ultimately God does decide to reveal His plans of judgment for Sodom to Abraham. Shortly hereafter, God refers to Abraham as a prophet while speaking to Abimelech in a dream in Gen. 20:7.