When onion is cool, add shrimp, Sherry, tarragon, salt, and pepper and stir until combined well.
04Roll out 1 sheet of pastry on a lightly floured surface into a 12-inch square. Cut into thirds in one direction, then into fourths in the other direction to make 12 (3- by 4-inch) rectangles. Cut each rectangle in half diagonally to form 2 triangles. Place 1 triangle on a work surface with longest edge nearest you, then put 1 teaspoon shrimp filling in center of triangle. Bring bottom corner of shortest side up to top point, then wrap remaining corner around resulting cone. Pinch to seal, then transfer to a lined baking sheet. Form more cornets in same manner, then repeat with remaining sheet of pastry. Chill first sheet of cornets, loosely covered, while making second.
05Whisk together egg and milk and lightly brush some of egg wash over top of pastries.
06Bake in upper and lower thirds of oven, switching position of sheets halfway through baking, until golden, 18 to 20 minutes total.
07Cool cornets on sheets on racks 5 minutes, then gently loosen from parchment with a spatula. Serve warm.