Cook spaghetti in a large pot of salted boiling water until al dente, reserving half cup pasta water.
Whisk egg yolks, heavy cream, grated Parmesan, and black pepper together in a medium bowl.
Heat olive oil in a skillet over medium heat and fry halloumi cubes five minutes until golden brown.
Add minced garlic to skillet and cook thirty seconds, then turn off heat.
Add drained hot spaghetti directly to skillet with browned halloumi cubes.
Pour egg cream mixture over pasta, tossing briskly while splashing two tablespoons reserved pasta water.
Toss until a glossy creamy sauce coats noodles evenly, garnish with fresh parsley, and serve immediately.