Joshua and the other leaders of the Israelites did not ask God what they should do.
Joshua and the other leaders acted very foolishly. The peace treaty was a very important decision. They should have asked God what to do, but they did not think they needed to do that.