You cannot read 8:39 without reading 8:38 since 8:39 is a continuation of 8:38. There verse in 2:256 is referring to disbelievers in generals while 8:39 is referring to those fighting against you. You cannot apply no compulsion in religion in the middle of a battle but if for some reason the person you are fighting has a change of heart you should cease hostilities against the person.

Regarding Bukhara 1.8.387, it helps to know the context in which it was said. Without the context, it is hard to talk about it. It would make sense if it supports 8:39 since that is directed against people who were actively fighting against the muslims.

السلام عليكم ورحمة الله وبركاته