Having finished just 17 hundredths of a second short at last month's opening Diamond League meeting in Monaco, Kipyegon seemed on track to achieve her ambition with 200 meters remaining, but faltered slightly over the final few meters to cross the line in 2:29.92.
Kosgei was later disqualified for infringement after she was found to have stepped on the rail.
The win puts Kenin into the third round at the US Open for the fourth year in a row. The American has come up short against top players like Maria Sharapova (2017), Karolina Pliskova (2018) and Madison Keys (2019) at this stage in the past.
The 33-year-old striker, who came on after the interval, latched onto a through pass from teammate Wu Xi before sending it into the net in the 65th minute.
"I just don't know what to say, it was really close to a perfect moment," Vetter told World Athletics.
"I think the supervisors are just doing their job, but very unlucky for Novak," said Zverev, who reached the quarterfinals by winning on Sunday. "If it would have landed anywhere else, he would have been fine."
Then in the third set, Williams was rarely troubled by her rival en route to the victory.
Messi's father Jorge flew into Barcelona on Wednesday to meet with Barcelona president Josep Maria Bartomeu, but that meeting failed to see the two parties move closer to an agreement, raising the possibility of a court case - something Messi insisted he wanted to avoid.
Nigerian striker Kingsley Onuegbu took a part in the ceremony for the trip to the 2020 season on Thursday. The 34-year-old displayed the team's new season jersey as one of 12 new comers.
Chen Siyan (70) and Yin Xiaowen (71) were the top amateurs at three-under par, tied for equal sixth with Miranda Wang Xinying (69) at seven strokes back.
She will take on 15th-seeded Maria Sakkari of Greece in the last 16, who stunned Williams at the Western & Southern Open last month.