Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:9:102

And ˹there are˺ others who have acknowledged their sins. They had mixed a righteous deed with another that was bad. Perhaps Allah will turn to them in forgiveness. Indeed, Allah is Forgiving and Merciful.  

And ˹there are˺ others (ākharūn is the subject), ˹another˺ folk, who have confessed their sins, for having stayed behind (i‘tarafū bi-dhunūbihim is an adjectival qualification of it ˹the subject˺ and the predicate is ˹the following, khalatū ‘amalan sālihan˺) they have mixed a righteous deed, that is, their former ˹participation in the˺ struggle, or the their confession of their sins, or otherwise, with another that was bad, which is their having stayed behind. It may be that God will relent to them. Truly God is Forgiving, Merciful: this was revealed regarding Abū Lubāba and a group of men who tied themselves to the walls of the mosque after they heard what had been revealed regarding those who stayed behind; they swore that only the Prophet (s) would untie them, which he did when this ˹verse˺ was revealed.
القرآن:٩:١٠٢

وَآخَرُونَ اعْتَرَفُوا بِذُنُوبِهِمْ خَلَطُوا عَمَلًا صَالِحًا وَآخَرَ سَيِّئًا عَسَى اللَّهُ أَنْ يَتُوبَ عَلَيْهِمْ ۚ إِنَّ اللَّهَ غَفُورٌ رَحِيمٌ  

{و} قوم {آخرون} مبتدأ {اعترفوا بذنوبهم} من التخلف نعته والخبر {خلطوا عملا صالحا} وهو جهادهم قبل ذلك أو اعترافهم بذنوبهم أو غير ذلك {وآخر سيئا} وهو تخلفهم {عسى الله أن يتوب عليهم إن الله غفور رحيم} نزلت في أبي لبابة وجماعة أوثقوا أنفسهم في سواري المسجد لما بلغهم ما نزل في المتخلفين وحلفوا لا يحلهم إلا النبي ﷺ فحلُّهم لما نزلت.