WASHINGTON ― Sen. John Cornyn (R-Texas) is a confident man. If you’d asked him over the past few months how things were looking on Obamacare repeal, he’d tell you it was on the verge of happening. He’s also the GOP whip, the person in charge of counting votes, which means he would know more than anyone if a bill can pass. It’s his job to know.

My god, he was so wrong.

Cornyn said in March to get ready for a repeal vote in early April. That never happened. By June, he predicted a procedural vote later that month and was “absolutely” sure the Senate would repeal Obamacare by late July. That didn’t happen either. Rolling into mid-July, Cornyn said he was “pretty confident” Obamacare repeal would pass and to expect a vote the next week.

He was right on the latter point: The Senate voted the following week on a repeal bill ― and it failed, as Cornyn conceded he had “no idea” that conservatives were going to oppose it.

When GOP leaders teed up a final vote last Thursday on a different, slimmed-down version of Obamacare repeal, Cornyn told reporters he expected it to pass. He even went on a conservative radio show that day and declared he was “quite optimistic” about its chances. Then that bill failed, after three Republican senators opposed it in a stunning late-night vote.

As Republicans figure out their next steps ― including how to tell supporters they have failed to deliver on a seven-year promise to get rid of former President Barack Obama’s signature health care law ― there is a lingering question: Does Cornyn just suck at his job?

Yuri Gripas/Reuters Reporters surround Sen. John Cornyn (R-Texas) ahead of a vote to repeal Obamacare. He’s probably telling them things are looking great.

His GOP colleagues scoffed at the question.

“Look, I’m not gonna get into those kind of conversations. It was a tough, tough row to hoe,” said Sen. Bob Corker (R-Tenn.). “Look, everybody worked hard, and it just didn’t happen.”

“I don’t agree with your premise of the question at all. This is very complex,” said Sen. Ron Johnson (R-Wis.). “I literally don’t envy leadership there. This is tough business.”

Sen. Richard Shelby (R-Ala.) said “all of us were wrong,” not just Cornyn, because nobody expected three GOP senators to vote “no” in the end. Sens. Susan Collins (Maine), Lisa Murkowski (Alaska) and John McCain (Ariz.) were the culprits.

“Cornyn’s done a good job,” Shelby said. “He’s got a difficult job.”

A whip’s primary task is ensuring party discipline. If Senate party leaders are determined to put a bill on the floor and pass it, the whip figures out who supports it and who doesn’t, and works on winning over those inclined to oppose it. It’s a powerful post; it makes Cornyn the third-highest-ranking person in his party. But when a bill fails on the floor, it means somebody screwed up. And it’s usually the whip.

“The whip is tasked with always knowing where the votes are,” said a top Senate Democratic aide. “And, well, they couldn’t convince their own side to go along.”

It was a tough, tough row to hoe. Sen. Bob Corker, on Cornyn's job finding votes to support Obamacare repeal

In Cornyn’s defense, his job was to lobby his members to support a bill that didn’t exist. There were so many versions of Obamacare repeal being floated that Republicans didn’t know what they were voting on. They couldn’t propose amendments because they didn’t know what they were amending.

At one point, senators had two hours to review a bill overhauling the nation’s health care system before voting on it. This came after a group of Republicans had been holding secret meetings for months to hammer out a bill, leaving some of their own members and all Democrats in the dark.

But Cornyn’s response to the disarray wasn’t to slow things down. He said Republicans didn’t have the “luxury” of knowing what was in an Obamacare repeal bill before voting on it. He also boasted that the process was “as open and transparent as it gets.”

Cornyn had been saying for weeks that he was confident repeal would happen, HuffPost noted to Shelby. “So was I,” Shelby replied.

But Shelby isn’t the whip. Cornyn is.

“I know that,” Shelby snapped. “But I’m one of the people here. We thought McCain would vote with us and he didn’t.”

Cornyn himself was brief when HuffPost bumped into him in a Senate hallway on Tuesday evening and asked how he felt about being so wrong about the fate of repeal legislation, after insisting for months it would pass.

“Well, it should have,” he said, slipping into his office. “It didn’t.”