Heat a drizzle of oil in a pan over medium-high heat. Add the mushrooms and cook, tossing occasionally, for about 6 minutes, until golden brown. Set aside. In the same pan, heat another drizzle of oil over medium heat. Add the onions and cook, tossing, for 6-7 minutes, until softened and slightly caramelized. Add the garlic, thyme, and ¼ cup water and cook until jammy, for about 3 minutes. Season with salt and pepper.