Heat the olive oil in a large skillet over medium heat. Add the shallot and cook until soft, about 4 minutes.
Add the mushrooms and cook until soft, about 8 to 10 minutes. Stir in the tamari, garlic, thyme, and rosemary. Sprinkle the flour over the mushrooms and stir for 1 minute.
Add the broth and simmer until thickened, whisking often, about 20 minutes. Season with salt and pepper to taste.
Notes
Make this recipe gluten free: Omit the flour in step 2. At the end of step 3, spoon a few tablespoons of the liquid into a small bowl. Add 2 tablespoons cornstarch and stir until smooth. Pour this mixture back into the pan and stir until the gravy thickens.