David sinned. God knew and so did everyone else. David’s sin caused physical wounds. His friends avoided him. His enemies set their traps. They plot deception.
God knows when I sin. My sins are no surprise to the Lord Jesus. God knows what my sin does to me. Consequences do not startle God. “All my longings (desires) lie open before you, O Lord; my sighing is not hidden from you,” David cried out. Though he sinned and was suffering the results of his vile, David renewed his appeal to God.
Communication about everything and anything is a part of the vital divine relationship. “Cry out, ‘Save us, O God our Savior; gather us and deliver us from the nations, that we may give thanks to your holy name, that we may glory in your praise.'” (1 Chronicles 16:35) “You hear, O LORD, the desire of the afflicted; you encourage them, and you listen to their cry,” (Psalm 10:17) When Apostle Peter denied knowing Jesus three times, Jesus called him to the beach to have breakfast. (John 21) Reunion is just prayers away.