The sudden alliance forged with the Gibeonites creates a fascinating diplomatic and moral tangle. It highlights the deep tension between the absolute duty to honor a promise and the heavy consequences of making fateful decisions based on a carefully crafted deception. The root of the failure for both the Israelites and their leader was a lapse in seeking divine guidance. Rather than consulting God through the Urim and Thummim held by Eleazar the Priest, they relied entirely on their own judgment [רלב״ג].
The act of establishing peace in this situation took on a unique form. It may have involved the physical drafting of a formal document outlining terms of peace [חומת אנך]. On the other hand, this action can be seen as an exceptional and innovative gesture by Joshua. Because the Gibeonites had already missed the standard window of opportunity to surrender before the conquests of Jericho and Ai, Joshua went beyond strict justice. He granted them peace without any initial conditions of taxation or servitude [אלשיך, מלבי״ם].
Following this initial agreement, Joshua took a more profound and official step by forming a covenant. However, he was careful to severely restrict its terms, committing only to letting them live and ensuring their physical safety. This strict boundary was necessary to avoid violating the absolute prohibition against making a comprehensive treaty with the native inhabitants of the land. Because the agreement only guaranteed their survival and did not protect them from future subjugation, it left a crucial loophole. Later, when the Gibeonites' deception was finally uncovered, this limitation allowed the Israelites to draft them into servitude as woodchoppers and water drawers for the community and for God's altar [מלבי״ם, רלב״ג, ביאור שטיינזלץ].
A notable detail in the agreement is that the leaders of the community swore an oath, rather than Joshua himself. Fully aware that their entire story was a fabrication, the Gibeonites desperately pushed for an explicit oath to secure their survival for the inevitable day their lie would be exposed [ביאור שטיינזלץ, חומת אנך]. They did not dare demand this oath from Joshua directly, as his agreement functioned as a standard political treaty rather than a religious oath sworn in God's name [אלשיך]. Moreover, Joshua maintained a firm principle of never swearing oaths. Consequently, the community leaders took the oath instead, acting with Joshua's full knowledge and consent [חומת אנך].
In the end, it was this oath from the leaders that served as the Gibeonites' ultimate shield. Even though the treaty was born entirely of deception and error, the Israelite leadership refused to break their word. They understood that violating the oath would deeply disrespect God's name in the eyes of the surrounding nations. As a result, when the truth finally surfaced, the Israelites held back and did not attack them [רלב״ג, אלשיך].