2 Samuel 16 describes how Ahithophel is giving Absalom bad advice. David had refreshed himself and he was now thinking rightly and keeping his eyes up, looking to the Lord. The Lord was the one who was frustrating the good advice of Ahithophel in order to bring disaster on Absalom. As Christians, we need to be able to discern what is godly advice and what is worldly advice. God is sovereign, and the Word of God helps us see clearly.