Exodus 23:21
20 “I am going to send a messenger before you to protect you as you journey and to bring you into the place that I have prepared. 21 Take heed because of him, and obey his voice; do not rebel against him, for he will not pardon your transgressions, for my Name is in him. 22 But if you diligently obey him and do all that I command, then I will be an enemy to your enemies, and I will be an adversary to your adversaries.
Joshua 24:29
18 The Lord drove out from before us all the nations, including the Amorites who lived in the land. So we too will worship the Lord, for he is our God!” 19 Joshua warned the people, “You will not keep worshiping the Lord, for he is a holy God. He is a jealous God who will not forgive your rebellion or your sins. 20 If you abandon the Lord and worship foreign gods, he will turn against you; he will bring disaster on you and destroy you, though he once treated you well.”
Notes and References
"... If not Judges 1, what was the primary context into which the mal’ak-episode was ‘inscribed’? Judging by the implied scenery, only one of the assemblies initiated by Joshua according to chapter 23 or 24 seems conceivable: After Joshua’s farewell speech, the angel, whose main function – as the readers know – is to “go before” the Israelites (Exodus 23:20, 23) and within whom YHWH’s name is present (Exodus 23:21), brings the people from Gilgal up to the mountain, where he delivers his speech of judgment, to which the people respond by crying and offering sacrifices, i.e., showing penitence; the place will be called “Bochim” in remembrance of that. Finally, Joshua dismisses the people – “everyone to his inheritance” – in order “to take possession of the land”. Comparing the two episodes in Joshua 23 and 24, it is obvious that the latter does not relate to the context we are looking for. For one thing, this is because the assembly in Joshua explicitly takes place at Shechem. Joshua 23, on the other hand, can easily be situated at Gilgal by Judges 2:1, since Gilgal is the place where Israel is encamped under the guidance of Joshua throughout the whole book preceding chapter 23 (see 4:19–20; 5:9–10; 9:6; 10:6–7, 9; 14:6). It is, however, not only a question of the topological connection between the pieces. Reading Judges 2:1–5 as a continuation of Joshua 23:1–16 (+ Judges 2:6) in fact points to the purpose of the mal’ak-episode in its given shape. Both the angel’s speech and Joshua 23 (again in contrast to Joshua 24!) deal with issues concerning the incomplete conquest of the land and the relationship between Israelites and the people of the land ..."
Blum, Erhard "Once Again: The Compositional Knot at the Transition between Joshua and Judges" in Berner, Christoph, et al. (eds.) Book-Seams in the Hexateuch I: The Literary Transitions between the Books of Genesis/Exodus and Joshua/Judges (pp. 221-240) Mohr Siebeck, 2018