In a large skillet, heat the olive oil over medium-high heat. Add the onion and garlic and cook until softened, about 5 minutes. Add the mushrooms and cook until golden brown, about 8 minutes.
Add the thyme, oregano, salt, and pepper. Stir to combine.
Add the green beans and stir to combine. Pour in the broth or wine and bring to a simmer.
Whisk together the flour and 1/4 cup of cold water until smooth. Slowly pour into the skillet while stirring constantly until thickened.
Transfer to a baking dish and bake at 350°F for 20 minutes.