Before the world began: Covenant of Redemption
In the beginning, there was nothing but God. Then, in the beginning, God created the heavens and the earth (Gen. 1:1). In the beginning, there was (past tense) the Word, and the Word was with God and the Word was God (Jn. 1:1). God existed before anything existed. He is eternity. Everything else is created and has a beginning. God is eternal and uncreated.
But the story started in eternity, before time started. In eternity, the Triune God planned the entire course of all creation. In eternity, God in His Triune Being focused on the centerpiece of His plan: the salvation of sinners. In this plan, the three persons of the Godhead came together and planned the salvation of God's people, for this is what God desires.
Scripture is clear about this plan. In Psalms 2:7, God the Father spoke of the decree that has already been made even before human rebellion, and thus in eternity. In Psalms 110, God plotted with God ("the LORD said to my Lord") for the kingly rule of the second lord ("the Son"). In John 5:19-28, Jesus spoke about the granting of authority from the Father (Jn. 5:22, 27) to accomplish the work God the Father gave Him to do. This happened in eternity because the imparting of "life of Himself" (Jn. 5:26) from the Father to the Son is in eternity. In his High Priestly prayer, Jesus revealed to us this plan when He spoke about the giving of all authority to Him (Jn. 17:2) before the world began (Jn. 17:24).
In Zechariah 6:13, the "counsel of peace" is made between "the Branch" and the priest on his throne. This cryptic language is strange until we figure out "the Branch" refers to the Messiah, of which Josiah is a mere type pointing to the Messiah. But what makes it even strange is that we have another person, a priestly figure, who is occupying the same throne, the same space. But how can two people occupy the same space, unless they are actually one? Thus, the counsel of peace is the covenant between the Messiah (God the Son) and God the Father, who are and is one.
What is this plan? In Psalms 110:4, the Son is termed a priest forever "in the order of Melchizedek" which is the eternal priesthood without beginning or end (Heb. 7:3. 15-20). In this covenant, the plan of salvation was stated. In eternity past, this plan of salvation, this counsel of peace, this pact of salvation (pactum salutis) was made.
God the Father made an agreement, made a covenant, with God the Son through God the Holy Spirit. In this pre-temporal, pre-creation covenant, God the Father gave the Son rule and authority, giving Him an eternal priesthood, with the purpose of giving Him the preeminence, the name above all other names (Eph. 1:21; Col. 1:18, Phil. 2:9). God the Son as part of His priesthood agreed to come down to be the sacrifice at the Cross for the salvation of His people (Heb. 9:12), and then after ascension He now is seated as King at the right hand of God the Father, and as priest in the act of intercession for His people (Heb. 7:25). As reward for His part in fulfilling the covenant, God the Son is granted a people, the people whom He has died for, a people to be His Bride (Rev. 21:2). And through it all, all glory rebounds upon God the Father (1 Cor. 15:28) even as all glory goes to the Son with the preeminence, the name above all other names.
The Covenant of Redemption is the covenant before all covenants. It sets the stage for the unfolding plan of God to work in the flow of history, the jewel of God's plan amidst the whole of creation. Before time and history has even began, God has already set the tone of the entire story, so that all things and events will develop for His glory, and our benefit.