Melt the butter in a pan over medium-high heat, add the mushrooms and onion and cook until the mushrooms have released their liquids and the liquid has evaporated, about 10-15 minutes, before setting aside.
Melt the butter in the pan, add the onions, carrots and celery and cook until tender, about 8-10 minutes.
Mix in the garlic and thyme and cook until fragrant, about a minute.