At-Tawbah 9:4
إِلَّا الَّذِينَ عَاهَدتُّم مِّنَ الْمُشْرِكِينَ ثُمَّ لَمْ يَنقُصُوكُمْ شَيْئًا وَلَمْ يُظَاهِرُوا عَلَيْكُمْ أَحَدًا فَأَتِمُّوا إِلَيْهِمْ عَهْدَهُمْ إِلَىٰ مُدَّتِهِمْ ۚ إِنَّ اللَّهَ يُحِبُّ الْمُتَّقِينَ ٤
Illa allatheena AAahadtum mina almushrikeena thumma lam yanqusookum shayan walam yuthahiroo AAalaykum ahadan faatimmoo ilayhim AAahdahum ila muddatihim inna Allaha yuhibbu almuttaqeena
“Excepting those of the idolaters with whom ye (Muslims) have a treaty, and who have since abated nothing of your right nor have supported anyone against you. (As for these), fulfil their treaty to them till their term. Lo! Allah loveth those who keep their duty (unto Him).” (9:4)
Existing Peace Treaties remained valid until the End of Their Term
This is an exception regulating the longest extent of time for those who have a general treaty - with out time mentioned - to four months. They would have four months to travel the lands in search of sanctuary for themselves wherever they wish. Those whose treaty mentioned a specifec limited term, then the longest it would extend was to the point of its agreed upon termination date. Hadiths in this regard preceeded. So anyone who had a treaty with Allah's Messenger , it lasted until its specific termination date. However, those in this category were required to refrain from breaking the terms of the agreement with Muslims and from helping non-Muslims against Muslims. This is the type whose peace agreement with Muslims was carried out to its end. Allah encouraged honoring such peace treaties, saying,
إِنَّ اللَّهَ يُحِبُّ الْمُتَّقِينَ
(Surely, Allah loves those who have Taqwa) 9:4, who keep their promises.