HOUSTON -- After scoring six runs in the last four games, Houston's offense went on a homer spree.
Carter hit a monstrous three-run shot to center field in the third to give the Astros a lead, and Castro and Krauss went back-to-back in the sixth, with Castro's homer a two-run shot.
"We've been going through our offensive woes and, again, to see the middle of the lineup swing the bat the way they swung it tonight was exciting," Houston manager Bo Porter said.
The last time Houston hit three home runs in an inning was June 5, 2013, against Baltimore.
The Astros were coming off a three-game sweep at the hands of Miami.
"It's just nice to see that after we struggled against the Marlins to score runs," Carter said. "It's nice to see the offense come around like that."
Houston starter Brett Oberholtzer (3-7) won for the first time since May 30, giving up three runs and eight hits with two strikeouts in 6 2/3 innings.
"For me and Castro, it was the same game plan," Oberholtzer said. "Just attack them, throw the ball in and stay away from the big innings."
Chavez allowed a season-high six runs and five hits with five strikeouts in 5 1/3 innings.
"I thought he was throwing the ball really well, real similar to how he did last time out," Oakland manager Bob Melvin said. "I think the Carter at-bat affected the way things went from there."
The three home runs allowed were a career high. Chavez had allowed three home runs in his last 11 starts combined.
"To sum up the whole day, it was three pitches and one walk," Chavez said. "That can't happen when you have the lead, and it's something that has been my Achilles heel, giving back the runs they get for me and not being able to get through six."
Athletics: Right-hander Jeff Samardzija, who is 2-1 with a 2.70 ERA in four starts since being acquired July 5 from the Cubs, will start Tuesday against the Astros in the second game of the three-game series.
Astros: Right-hander Scott Feldman, who is 4-8 with a 4.60 ERA, will try to bounce back Tuesday after one of his worst starts of the season, giving up six runs in 5 1/3 innings in a 13-1 loss at Oakland Thursday.
Athletics: Outfielder Craig Gentry was placed on the 15-day disabled list Monday with a broken right hand, and the A's promoted OF Billy Burns from Double-A Midland. Gentry was injured Sunday at Texas after being hit by a pitch.
Astros: Right-hander Josh Zeid, who is on the disabled list with swelling near the left big toe, is going to see a specialist Tuesday and hopes to avoid surgery.
ALTUVE IS STREAKING
Houston second baseman Jose Altuve extended his hitting streak to 10 games with a single in the third inning. Altuve, who leads the Majors with 149 hits, had a season-high hitting streak of 12 games from May 8-21.
REDDICK SHOWS OFF GLOVE
Josh Reddick flashed the leather twice in the seventh. Enrique Hernandez led off with a sharp liner to right, but Reddick ran it down in the corner, keeping the ball from hitting the top of the fence. Altuve followed with another hard-hit ball that was about to fall in. Reddick dived forward to make another highlight-reel play.