Harrell walked Oswaldo Arcia later in the inning with the bases loaded to make it 6-4.
"It's definitely frustrating. If I don't pitch better I'm going to be gone," Harrell said. "Being realistic, that's the way it is. Hopefully they'll even give me another chance to go back out. Hopefully finish the rest of the year and have a couple good outings and end on a high note."
Dozier and Arcia led off the first and second innings with triples off Bedard and eventually scored.
The Twins took a 3-1 lead in the second on a blooper-reel type of play that left Jose Altuve and Wallace staring at each other while Bedard pounded his glove in frustration.
With runners on first and third and one out, Dozier struck out and Doug Bernier got caught in a rundown trying to steal second. With an eye on Thomas creeping off third, Altuve chased Bernier back to first and bumped into Wallace as Thomas scampered home.
Thomas was credited with a steal of home, Minnesota's first since Torii Hunter swiped home versus Detroit on May 4, 2002.
"We were moving around pretty good out there," Gardenhire said. "All he's gotta do is get in a rundown in that situation. They got a little confused, and there ya have it."
Bedard settled down after the mishap and appeared on his way to snapping a five-game losing skid.
Houston grabbed a 4-3 lead after Wallace's solo homer which was part of five straight two-out hits in the third.
But Harrell -- typically a starter -- allowed a leadoff double to Thomas in the seventh and struggled from there.
Harrell has been used out of the bullpen recently after several trades shook up Houston's rotation. Friday night's game lasted 13 innings and required manager Bo Porter to get a little creative with his pitchers.
"This being my first year as a manager and being in baseball as long as I've been in baseball, this is arguably the toughest stretch I've witnessed -- whether its player, coach, manager -- of bullpen woes," Porter said.
The Astros will recall Brad Peacock from Triple-A Oklahoma City to start Sunday's series finale. Peacock is 6-2 with a 2.73 ERA in the minors and 1/3 with an 8.07 ERA in nine appearances with Houston this season. Outfielder Jimmy Paredes will be sent down. ... Andrew Albers will make his major-league debut for the Twins on Tuesday against Kansas City. The Canadian lefty arrived in Minnesota a couple of hours before Saturday's first pitch, bleary-eyed but excited for his opportunity. "It's been a whirlwind last day-and-a-half. Just trying to take it all in right now. Not sure if it's really sunk in," said Albers, 11-5 with a 2.86 ERA at Triple-A Rochester. "I'm really thrilled to be here." ... Altuve returned after missing the past two games with a sore quad. ... Mike Pelfrey (4-9, 5.31) takes the mound for Minnesota on Sunday and will try to break a three-game losing streak.
Copyright by STATS LLC and The Associated Press
MINNEAPOLIS, MN - AUGUST 3: Kyle Gibson #44 of the Minnesota Twins delivers a pitch against the Houston Astros...