01 - Preheat oven to 400°F.
02 - Season beef cubes generously with salt and pepper. Heat olive oil in a large Dutch oven or heavy-bottomed pot over medium-high heat. Brown beef in batches without overcrowding, transferring browned pieces to a plate.
03 - Reduce heat to medium. Add butter to the pot, then sauté onions, carrots, celery, and potatoes for 5 minutes until softened. Add garlic and cook 1 minute more until fragrant.
04 - Stir in flour and cook for 1 minute, stirring constantly. Add tomato paste, mixing well to combine.
05 - Pour in red wine if using and deglaze the pot, scraping up any browned bits from the bottom. Add beef stock, Worcestershire sauce, thyme, and bay leaf. Return browned beef along with any accumulated juices to the pot.
06 - Bring to a simmer, then cover and cook over low heat for 1 hour, stirring occasionally, until beef is fork-tender.
07 - Remove and discard bay leaf. Stir in frozen peas and cook for 2 minutes. Taste and adjust seasoning with additional salt and pepper as needed.
08 - Transfer beef mixture to a 2-quart baking dish.
09 - Drape puff pastry over the filling, trimming any excess and pressing edges firmly to seal. Cut 4-5 small slits in the pastry to allow steam to escape during baking. Brush entire pastry surface with beaten egg.
10 - Bake for 25-30 minutes, or until pastry is deeply golden and crisp. Cool for 10 minutes before serving to allow filling to set.