Preheat oven to 375 degrees F.
Melt butter in a large sauté pan over medium heat.
Cook the onions with salt and pepper, to taste, until soft (about 7-9 minutes).
Add garlic and thyme and cook for an additional minute, stirring frequently.
Add flour and cook for about 1 minute longer.
Turn up the heat to medium-high and deglaze the pan with the wine.
Whisk in the stock and Dijon mustard.
Add chicken, peas, and carrots and cook on a very low simmer until the sauce thickens into a gravy (about 10 minutes). Remove from heat and set aside.
On a lightly floured surface, unfold the pastry dough and cut each sheet into 4 even squares (for a total of 8 squares).
Gently roll out each square, increasing the size of the square by about 20 percent.
Place the squares on baking sheets and spoon the chicken mixture into the center.
Fold the squares diagonally to create triangles. Pinch the edges together to create sealed pockets. Press the edges with a fork to create a decorative border, if desired.
Whisk the egg with a splash of milk or water and brush the tops of the pockets with the egg wash.
Cut a small slit in the top of each pocket to allow the steam to escape during baking.
Bake the pockets until golden brown, about 20-25 minutes. Let cool for about 10 minutes before serving.
Tip: These can easily be frozen for a later meal. Just place the baking sheet in the freezer before baking the pockets. Allow pockets to completely freeze before wrapping tightly and storing in the freezer. When ready to bake, just place in the oven from frozen (no need to thaw). You may have to cook them a bit longer, so just adjust the time as necessary.