Cosart threw only 15 of his 39 pitches for strikes, allowing four walks and three hits, including homers by Alberto Callaspo -- a three-run shot -- and Josh Reddick, who capped the first-inning outburst with a two-run homer that made it 7-0.
"He just didn't have command," Astros manager Bo Porter said. "As a club tonight, we struggled to throw strikes. Against a patient team like this that's going to try to work the count, we played right into their hands by not throwing strikes, and when we did come across there, they put good swings on it."
Cosart (1-2) said the ball was slipping out of his hands.
"My arm felt good and body felt good, and I got out there on the mound and after the first pitch the ball was slipping and all over the place," he said. "Everything else is pretty self-explanatory. I walked a lot of guys and got behind and had to come back into the zone and they hit them."
The A's got four homers on the night, with Yoenis Cespedes and Coco Crisp taking deep Paul Clemens, who worked 4 1/3 innings in relief. Oakland improved to 21-5 all-time against the Astros.
"It's tough when you spot them that many runs and you're playing from behind," Porter said. "Coming into this series, offensively we haven't been scoring too many runs and we were going to be up against it to mount a comeback at that juncture. At the same time, you've got to try to find a way to minimize the damage."
There were a few fireworks at the end of the third inning, when Porter ran onto the field and yelled at A's shortstop Jed Lowrie. The former Astro had tried to bunt in the first inning with a 7-0 lead, later saying he was trying to beat a shift, and Clemens threw a pitch between his legs in his next at-bat. After Lowrie flied out to end the third, he was standing at first when Porter came onto the field and yelled: "Go back to shortstop." Both sides downplayed the incident.
Cosart's start was the shortest by an Astros pitcher since Philip Humber worked one-third of an inning on April 20, 2013 against the Indians. That game marked the third time in a five-game span an Astros starter couldn't escape the first. The other two happened in Oakland -- on April 15 (Erik Bedard) and April 17 (Bud Norris).
"It's not something that we want to relive," Porter said. "It makes it tough on your bullpen when the starter doesn't make it out of the first inning. I thought our bullpen did a good job. Clemens did a tremendous job getting it to the point to where we were able to finish with the guys we were able to finish with, and hopefully everybody will be OK tomorrow."
Astros starters had combined to post a 3.00 ERA in their seven games prior to Friday. Houston hurlers combined to walk a season-high 10 batters.
"That's how you get starters out of the game," A's manager Bob Melvin said. "That's how you can beat good pitchers without having to beat them sometimes. That's been one of our better attributes for two-plus years now, making guys work. Similar to a boxer, some body blows and sooner or later you end up doing some damage. That's something we stress and, to an extent, the team is put together that way."
There was a huge positive, however, for the Astros - their bats came alive.
Houston's scuffling offense tied a season-high with 10 hits, including nine singles, with Jose Altuve, Dexter Fowler, Jonathan Villar and George Springer having two hits each. Springer had his first career RBI and multihit game while batting cleanup in only his third game in the Major Leagues.
"Offensively, those guys continued to battle their ABs," Porter said. "They didn't give any bats away, but that's a credit to our group. They're not going to fold their tent."
A's starter Sonny Gray (3-0) allowed a career-high nine hits, but still managed to win with a quality start in which he allowed three runs in six innings.
"It's tough being down, 7-0, but it happens in this game sometimes and you've got to show some heart and fight back," Astros outfielder L.J. Hoes said. "We did a pretty good job of staying in the game swinging the bats. We hit the ball hard in certain situations, and some of them got through and some didn't."
The Astros, trailing 8-0, led off the fifth with singles by Villar -- breaking an 0-for-16 funk -- Altuve and Fowler, who drove in Villar. After Jason Castro struck out, Springer singled to center to score Altuve for his first career RBI. Fowler scored on Chris Carter's bases-loaded sacrifice fly to make it 8-3.
Crisp's two-run homer off Clemens in the fifth pushed Oakland's lead to 10-3.
"Got stubborn my last hitter," Clemens said. "I've really been good about focusing on every single pitch and going pitch to pitch. Me and Crisp got locked in a battle and instead of staying pitch to pitch, I got a little bullheaded and said, 'Let's go. Let's fight.' He got me."