Originally a discarded Cyberman head, ‘Handles’ was acquired by The Doctor at the Maldovarium Market, and subsequently repaired. All of its organic components and Cyberman protocols had been cleansed out, leaving it a plain, docile robot that interpreted commands literally whether or not they were meant to be taken as rhetorical statements, such as immediately reminding The Doctor to re-route the TARDIS phone back through the console rather than the exterior door. It was never established precisely why The Doctor chose to acquire Handles, but with Clara Oswald still a ‘part-time’ companion, Handles was a welcome regular companion for him, assisting The Doctor in searching for the source of a mysterious signal being sent from an initially-unknown planet.
When his attempts to visit two ships resulted in The Doctor nearly being attacked by the Daleks and the Cybermen – particularly when he went on the Cyberman ship carrying Handles, prompting the Cybermen to interpret his presence as a threat – he took a brief break to visit Clara when she called him for help, introducing her to Handles. Having finally reached the planet, The Doctor traced the source of the signal to a crack in reality (“The Eleventh Hour”), using Handles and the Seal of Rassilon (“The Five Doctors”) to translate the signal, Handles confirming that it was ‘a request for information’ being sent backwards and forwards through timeâ€¦ specifically, the question ‘Doctor Who?’. With Handles having previously incorrectly identified the planet they were orbiting as Gallifrey, The Doctor realised that the signal was coming from the pocket universe that he had sent Gallifrey to at the end of the Time War (“The Day of The Doctor”), with the signal being the Time Lords’ attempt to receive confirmation that it was safe for them to return.
With the Church of the Papal Mainframe refusing to allow The Doctor to bring Gallifrey back in case it restarted the Time War, and The Doctor refusing to abandon the planet to its fate, The Doctor and the Church were instantly locked in a stalemate, The Doctor remaining to stop any of the surrounding alien ships destroying the planet but unable to be taken away in case he revealed his name and let the Time Lords back. The situation was made even more complicated with the discovery that the planet in question was Trenzalore, which The Doctor and Clara had previously learned was the location of The Doctor’s future grave (“The Name of The Doctor”). With Clara having been sent away in the TARDIS to keep her safe, Handles was The Doctor’s only constant companion as he remained trapped on the planet for over three centuries, The Doctor growing old while Handles gradually broke down and rusted as time went on, slowly losing his ability to function.
Although The Doctor did his best to keep Handles working, the lack of technology on Trenzalore meant that The Doctor eventually lost the ability to keep the head going. When Clara finally returned three centuries later, she joined The Doctor and Handles in watching Trenzalore’s brief sunrise, but Handles finally broke down for good just before the sun rose, his last words being to remind The Doctor to patch the TARDIS phone back to the TARDIS console. Handles’ death reduced The Doctor to tears, the disembodied head having been more human than most Cybermen and a source of vital comfort for The Doctor as his constant companion during his centuries of self-imposed exile; even after his regeneration some centuries after Handles’ death, the Twelfth Doctor still remembered the Cyberman head, briefly confusing Clara with Handles during his post-regenerative trauma (“Deep Breath”).