yeah he wasn't really ready to come back but Lee really needed him at that point, even before Richmond fell. He was running out of trusty top lieutenants
he came back in October, Early was failing in the Valley, Hill was ill and Ewell was basically only in charge of the home guard around Richmond. He needed Longstreet immensely at that point