There was an exchange written (but cut for time) where the Doctor ordered Ashildr not to wipe Rigsy’s memory so that he could take care of [Clara’s] body and tell her family and honor her always. As we see from the post-credits scene, Me let him keep his memories of trap street.
Sarah Dollard on a cut scene from Face the Raven (x)