Sarah Jane's exit in Hand of Fear
She throws a wonderful fit and the Doctor ignores the whole thing and then when she tells him again she's done, he asks how she knew that he got the call from Gallifrey and would have to take her home, and she does an immediate 180.
By far my favorite companion either classic or new.