The Astros mustered little offense against White Sox ace Chris Sale, who pitched into the ninth inning and struck out 12 batters while holding Houston to four hits and one run.
"He was vintage Chris Sale," Astros manager Bo Porter said. "He's a strikeout guy, a power arm and was pretty much lights out. We hit the balls hard, but they were able to make plays. But other than that, he was pretty dominant."
Cosart delivered his seventh quality start in his eighth Major League outing, holding the White Sox to seven singles and one run in six innings. He has pitched at least five innings and allowed no more than three runs in all eight of his starts, but he only has one win to go along with his 1.59 ERA.
"I was hoping to give up no runs, but I knew I was going to have to give up one run or less to try and keep my team in the game, just because of the pitcher [Sale] is," Cosart said. "Hopefully, we were going to scratch some runs together."
Harrell (6-15) entered a tied game in the seventh and walked three of the first five batters he faced before Garcia's homer, though miscommunication at second base led to a costly error that didn't help Harrell's cause. Garcia's homer, which made it 5-1, came after Harrell walked Adam Dunn and Paul Konerko.
"I kind of tried to pitch around Dunn and Konerko a little bit, but I was trying to get some weak contact," Harrell said. "Dunn has a good history against me and Konerko doesn't, and I was just trying to make a good pitch and missed on the edges a couple of times, so I wasn't that mad that I walked those two guys. I was more mad I gave up the home run afterward."
Porter said he gave the ball to Harrell because he hadn't pitched in nine days and wanted his long reliever to work in a tie game.
"Hopefully, you score a couple of runs and have a chance to close it out," Porter said. "If not, he's in the game until the tie's broken."
Sale (10-12) carried a shutout into the seventh inning before Astros first baseman Chris Carter hit a long solo homer -- his 26th of the season -- to tie the game at 1. He's the first Astros player to hit at least 26 homers in a season since Carlos Lee hit 26 in 2009.
"I kept them off-balance as much as I could," said Sale, who set a club record by striking out at least 12 batters for the fourth time in a season.
Harrell relieved Cosart to start the bottom of the seventh and walked leadoff hitter Leury Garcia, which proved costly.
Leury Garcia stole second when the Astros' Jake Elmore was late to the bag to catch the throw from catcher Cody Clark, allowing Garcia to take third with no outs. He scored on a sacrifice fly off the bat of Jeff Keppinger, reaching out to slap the plate just ahead of the throw from Brandon Barnes, to put the White Sox ahead, 2-1.
The walks to Dunn and Konerko set the table for Avisail Garcia to strike a dagger into the Astros with his third homer.
"The walks definitely hurt him," Porter said. "Solo home runs normally don't hurt you, but when you put two guys in front of them and then give up the home run, that will hurt you."
Cosart found himself in big trouble after walking Leury Garcia to start the game and then giving up singles to Gordon Beckham and Keppinger to load the bases with no outs. He came back to strike out Dunn, but Konerko singled to center to put the White Sox ahead, 1-0.
Cosart escaped the jam by getting Avisail Garcia to hit into an inning-ending 5-4-3 double play.
"That's happened a lot this year, but that's when you have to make your big pitches," Cosart said. "A lot of it was I know I'm going up against Sale and I think was trying to do a little too much and [that] kind of led to me being a little wild."
Sale struck out seven of the first 10 batters he faced and was rolling through six scoreless innings, having allowed just two hits and one walk. He had retired 19 of the 22 hitters he had faced before Carter hit a 421-foot home run into the left-field bleachers to tie the game.
"He's tough to hit anyway, and when he's on, really tough to hit," Elmore said. "As a team, you have to go out there and if he makes a mistake, you try to take advantage, and he just didn't make any."