Cook's future has been called into question since he gave an interview to the Cricketer magazine on the eve of the Bangladesh and India tours in which he said: "Deep down I don't know how much longer I am going to carry on. It could be two months, it could be a year."
Suspicions he was preparing to step down only escalated after Cook described Joe Root as "ready to captain" following defeat in the Mumbai Test. That result meant England had lost three Tests in succession, four of their last five and five of their last seven. From a position where England were a result or two from reaching the top of the Test rankings in August, they are now facing the prospect of dropping to fifth if they lose the final Test of the series against India in Chennai.
But Bayliss, the England coach, is clearly in no doubt that he wants Cook to continue. Describing Cook's record as "fantastic", Bayliss acknowledged that talk of him standing down had become a distraction.
"I think everyone, to a man, in the dressing room would be disappointed if he wasn't captain," Bayliss said. "But when it's constantly in the media all the time, it's a bit of a pain in the backside. Especially when no one around the team believes that or thinks that. It's a little bit aggravating.
"I suppose anyone who's done the job for that long, there's always going to be questions towards the twilight of his career. But the job he's done with the group, I think, has been fantastic."
Bayliss was especially frustrated as talk over Cook's future had, he felt, detracted from "all the good things" England have achieved on the tour. And it is true that, while the scoreline is grim, England can take some comfort in the emergence of a couple of promising top-order batsmen, in Keaton Jennings and Haseeb Hameed, and the improvement in Adil Rashid's legspin bowling.
"It takes the focus away from all the good things we've done on this tour," Bayliss said. "I think we've played some good cricket here. We've got to give credit where credit's due: we've played good cricket and they've played even better cricket."
Bayliss now plans to speak to Cook and Andrew Strauss, the managing director of the England team, to resolve the uncertainty over the captaincy.
"We've had some discussions in the past," he said. "But those two guys - Cook and Strauss - have obviously had a big history. I'm sure we'll have a chat between the two or three of us."
Bayliss has previously stated that he expected Cook to be captain for the Ashes series in 12 months' time. "He's talking about the next Ashes series and being out in Australia," Bayliss told the BBC last week. "Sometimes there are little comments made along the way and they get blown out of all proportion.
"He's certainly up for the fight. I haven't had any discussion with him any other way and that's what we've been working towards. I was as surprised as anyone when I saw that in the papers."