Preheat your oven to the temperature specified on the puff pastry package (usually around 375-400°F or 190-200°C). Line a baking sheet with parchment paper.
Roll out the puff pastry dough on a lightly floured surface to smooth out any creases or folds. Spread a layer of pesto sauce evenly over the entire surface of the puff pastry. Sprinkle the shredded mozzarella cheese and grated Parmesan cheese evenly over the pesto-covered dough.
Carefully fold the puff pastry dough in half lengthwise, covering the pesto and cheese filling. Use a sharp knife or a pizza cutter to slice the folded dough into thin strips, creating long rectangular strips of dough. Take each strip of dough and twist it gently, creating a twisted straw-like shape.
Place the twisted puff pastry straws on the prepared baking sheet. Beat the egg in a small bowl to create an egg wash. Brush the tops of the puff pastry straws with the egg wash. Sprinkle with sesame seeds.
Bake for about 10-15 minutes or until the puff pastry straws are golden brown and puffed up. Remove from the oven and let them cool slightly. Serve your pesto cheese straws warm. They are perfect as an appetizer or a snack and are sure to be a hit at any gathering.