Keir Starmer and McSweeney decided it was the right time for him to leave, the BBC understands, as Jill Cuthbertson and Vidhya Alakeson are appointed acting chiefs of staff.