Steven Moffat reveals that he wrote the end of "The Husbands of River Song" with one eye on it being his last Doctor Who story...

A spoiler for the ending of "The Husbands of River Song" lies ahead...
With the tenth series of Doctor Who kicking off next month, Steven Moffat has one last full run of the show to polish off, before handing over the reins to Chris Chibnall for series 11. However, in a new interview with Empire magazine, he’s admitted that he wasn’t entirely sure he’d be overseeing series 10 at all, and that he suspected he might be leaving the job a little earlier.
“I vaguely thought I’d be going last year,” he told the magazine, referring to the 2015 series of the show. “So the last scene of Christmas that year [he’s talking about "The Husbands of River Song" here] with the Doctor finally making it to the Darillium, which we hear about in the episode just before I took over, was as close as I’ll ever get to making any attempt at closure.”
The end of "The Husbands of River Song" saw the Doctor and River finally getting their long-promised meal, living happily ever after, at least for 24 years.
Moffat, however, did opt to continue, meaning he's got a whole new sort-of-ending to write, although Chris Chibnall, he's confirmed, will be writing the dialogue for Peter Capaldi's replacement.
In the same interview, incidentally, Steven Moffat confirmed again too that once he departs the executive producer role on Doctor Who, he won’t return to write for the show again.
The new issue of Empire magazine goes on sale this Thursday. Its website is here.