"Then said the LORD unto me, Though Moses and Samuel stood before me, yet my mind could not be toward this people: cast them out of my sight, and let them go forth." (Jeremiah 15: 1)
Context is crucial when reading the Old Testament, in which the heavy railings of the God of Justice, as much the God of Love, cannot overlook the sins of His people Israel. The Old Testament was never written to us today, but for our benefit, that we may see pictures of Jesus and His Finished Work, of the transformation in place from Old Covenant under law to the New Covenant of Grace and Peace in Christ Jesus.
With even the most damning of indictments, we can see the forerunner who would die for us.
Moses represents the Law, and Samuel represents the prophets, neither of whom can save anyone.
Only Jesus, God made flesh, the Son of God, could do that, and He did just that.
On the Mount of Transfiguration, the apostles Peter, James, and John saw Jesus transfigured with Moses and Elijah:
"And his raiment became shining, exceeding white as snow; so as no fuller on earth can white them. 4And there appeared unto them Elias with Moses: and they were talking with Jesus." (Mark 9: 4)
Peter, attempting to honor Jesus with the Law and the Prophets, wanted to house all three of them, as if God can dwell in anything that man can build (1 Kings 8: 27)
5And Peter answered and said to Jesus, Master, it is good for us to be here: and let us make three tabernacles; one for thee, and one for Moses, and one for Elias. 6For he wist not what to say; for they were sore afraid." (Mark 9: 5-6)
Sometimes, the best thing to say when you do not know what to say, is to say nothing. God corrected Peter's misunderstanding honor:
" 7And there was a cloud that overshadowed them: and a voice came out of the cloud, saying, This is my beloved Son: hear him." (Mark 9: 3-7)
The Law and the Prophets witness of one Person: Jesus Christ! So, if Moses and Samuel would not be able to turn the wrath of God away from Israel, we have nothing to worry about, for His Son has thoroughly reconciled us to God the Father (2 Corinthians 5: 17-21), granting us His own righteousness through the death and resurrection of His Son Jesus.
When you read the Word of God, when it seems that all is lost in terms of the wrath of God, remember that we have a better representative than the Israelites of Jeremiah's day: God's own Son, Jesus Christ.