About 20 minutes before baseball’s trade deadline on July 31, the Mets’ top baseball executives were holed up in a conference room at Citi Field, nearly out of options for filling their dire need for a formidable hitter in the lineup.

Two days before, the Mets, and everyone else, thought they had a deal for outfielder Carlos Gomez of the Milwaukee Brewers, only to see it fall apart spectacularly for reasons that have been disputed. The Mets had then turned their attention to talks with at least three other teams: the San Diego Padres, about outfielder Justin Upton; the Cincinnati Reds, who had outfielder Jay Bruce to offer; and the Detroit Tigers, who had outfielder Yoenis Cespedes. As the deadline drew close, efforts to acquire Upton and Bruce fizzled.

One last time, they discussed whether to make a last-ditch trade for Cespedes. Jeff Wilpon, the Mets’ chief operating officer, was in the room, along with Sandy Alderson, the general manager, and two of his assistants — John Ricco and Paul DePodesta. Another assistant, J. P. Ricciardi, called in remotely, and members of the analytics team and baseball operations staff popped in and out.