PITTSBURGH -- Theo Epstein said he is staying with the Chicago Cubs as president of baseball operations and dismissed speculation that he could return to the Boston Red Sox, with whom he was general manager from 2002 to 2011.

"I'm here [with the Cubs]," Epstein said Wednesday afternoon from PNC Park, where the Cubs were playing the Pittsburgh Pirates. "We have a lot we need to work on to get back to the level we're accustomed to. I'm invested in that. That's what I'm focused on."

Epstein has two years left on an extension he signed after the Cubs won the 2016 World Series. He has often said that a decade is a good length of time to be in a team's front office; he'll reach 10 years with the team after the 2021 season.

With the Brewers clinching a wild-card berth Wednesday night, the Cubs were officially eliminated from postseason contention. It's the first time in five years they will miss the playoffs.

Epstein said the Cubs' poor play down the stretch was "definitely surprising."

"When you have the best possible outcome and overcome a lot of things and do some transcendent things, you grow from that because you do something you haven't done before," he said. "When you have the middle-of-the-road outcome you can always tell yourself whatever story you want to hear. It's a gray area. When you have the worst possible outcome, like we've had, it reveals everything. As painful as it can be, it creates a real opportunity to learn from it and grow."

Epstein added, "The thing that gets you excited, even in the face of this adversity, is waking up and trying to build the next Cubs championship team."

Though the Red Sox have an opening in their front office after firing Dave Dombrowski, neither Epstein nor Cubs general manager Jed Hoyer -- who also spent time in Boston's front office -- has expressed interest in the job.

"I have really good relationships with a lot of people there and certainly wish them the best," Epstein said of the Red Sox.

One of Epstein's first offseason tasks will be deciding the fate of manager Joe Maddon, whose contract is up at the end of the season. Asked if he had a timeline for that decision, Epstein said, "I'm going to keep that between me and Joe. That's not something I feel comfortable talking about."