In a large skillet, heat 2 tablespoons of the olive oil over medium heat. Add the onions and shallot and cook, stirring, until soft, 6 to 8 minutes. Add the garlic and thyme and cook, stirring, until fragrant, about 1 minute. Season with salt and pepper. Add the mushrooms and cook, stirring, until the liquid released by the mushrooms has evaporated and the mushrooms brown, 8 to 10 minutes. Remove the thyme sprigs from the mixture and discard. Transfer the mixture to a large bowl. Set aside.