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 to avoid 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 with the flour mixture.
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 and any accumulated juices to the pot.
06 - Bring to a simmer, cover, and cook over low heat for 1 hour, stirring occasionally, until beef is tender and sauce has thickened.
07 - 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 excess and pressing edges firmly against the dish rim to seal. Cut 3-4 small slits in the pastry for steam to escape. Brush entire pastry surface with beaten egg.
10 - Bake for 25-30 minutes, or until pastry is deeply golden and crisp. Let cool for 10 minutes before serving to allow filling to set.