Beane certainly got quantity in the deal, which was completed not long before Monday’s trade deadline. Cashman clearly got quality. Beane did not return a call seeking comment, but the Athletics’ willingness to move Gray at this stage of his career — and coming off a July in which he went 3-1 with a 1.48 E.R.A. — raises the question of whether Gray’s injury history was a factor in the decision to let him go.

“We checked out all his medicals, and he’s fine,” Cashman said. “He’s at no more risk than any of our other guys who throw the baseball for a living. I just think Billy’s gearing up to fight another day.”

Gray, who was 6-5 with a 3.43 E.R.A. in 16 starts over all for Oakland this season, was shut down for 10 days in spring training because of the muscle strain, and he did not make his first start until May 2.

Although he pitched seven innings of three-hit, one-run ball against the Miami Marlins on May 24, Gray did not hit his stride until a June 25 start against the White Sox in Chicago. In the six starts beginning with that game, Gray won four of six games and allowed just six earned runs in 39 ⅓ innings.

“That was a one-time thing,” Gray said of the injury. “But it just kind of lingered on, and they were a little cautious with it, which I completely understand. If it had happened in the middle of the season, I might have missed two or three starts. But because it happened at the beginning of the season, it might have seemed like more of a thing than it was.”

Thursday will be Gray’s third start against the Indians this season. He turned in his worst outing of the season against them in Cleveland on May 30, allowing seven earned runs in four and two-thirds innings, but bounced back to beat them on July 14 in Oakland, pitching six shutout innings and allowing only two hits. Gray said his wife and 2-year-old son, Gunnar, would meet him in Cleveland for his first start as a Yankee.

“It’s not going to be a surprise when Cleveland sees him,” said Joe Girardi, the Yankees’ manager. “They know what kind of stuff he has. As far as expectations, you just hope that he doesn’t get too excited tomorrow and he just goes out and pitches the way he’s capable of pitching. And if he does that, that’s going to be pretty good.”