Astros manager A.J. Hinch said Wednesday that Sanchez had the surgery last week in California and indicated that his rehabilitation and recovery time likely will extend into next season.
The 27-year-old hasn't pitched since Aug. 20 because of what the team said was a sore right pectoral muscle. The team had expected him to return this season, but general manager Jeff Luhnow said last week that he would need the procedure on his right shoulder and wouldn't return this year.
Sanchez, who is 5-14 with a 5.89 ERA and 115 strikeouts this season, was acquired from Toronto in a trade on July 31.