<Tr> <Td_colspan="8"> (Part 2) Beckett and the mystery caller, a hacker named Vikram Singh (Sunkrish Bala), fend off the killers before a CIA agent named Rita (Ann Cusack), the wife of Jackson Hunt and Castle's stepmother, intervenes . Beckett and Singh start piecing the puzzle together: Singh encountered a project called LokSat and forwarded it on to McCord and her team, setting events in motion . When McCord was killed, he contacted Beckett . Rita supplements this with her own investigation into LokSat, revealing that Bracken had a partner who used CIA assets to smuggle drugs into the country during the events of "In the Belly of the Beast", and using the proceeds to bankroll Bracken's presidential campaign . Bracken is killed in prison by his partner Loksat and his team . Reuniting with Castle and her team, Beckett realizes that the conspiracy has not been brought to heel and that the Attorney General is a part of it . However, Bracken's partner remains at large, and his prediction that Beckett will be consumed by her obsession comes true when she leaves Castle . </Td> </Tr> <Tr> <Th> 154 </Th> <Td> </Td> <Td> "PhDead" </Td> <Td> Rob Bowman </Td> <Td> Chad Gomez Creasey </Td> <Td> October 5, 2015 (2015 - 10 - 05) </Td> <Td> 804 </Td> <Td> 6.76 </Td> </Tr> <Tr> <Td_colspan="8"> Castle insinuates himself into Beckett's investigation of the murder of a Hudson University student and discover that the frat boy was involved in a recreation of the Stanford Prison Experiment . Alexis goes undercover as a student . Beckett and Singh continue their secret investigation by having Singh metaphorically "dig up the dead" for more leads . </Td> </Tr> <Tr> <Th> 155 </Th> <Td> </Td> <Td> "What Lies Beneath ..." </Td> <Td> Larry Shaw </Td> <Td> Barry O'Brien </Td> <Td> October 12, 2015 (2015 - 10 - 12) </Td> <Td> 803 </Td> <Td> 6.78 </Td> </Tr>

When do castle and beckett get back together in season 8