Bring a large pot of water to a boil. Add salt and stir in pasta. Cook until al dente, then drain and keep warm.
Beat the egg, egg yolk, and milk in a small bowl with half of the cheese. Set aside.
Cook bacon until crispy, then remove. Add olive oil, onion, and garlic to the skillet; cook until softened.
Add drained pasta to the skillet with reserved pasta water. Add egg mixture, stirring constantly for 1 minute.
Remove from heat, stir in remaining cheese, bacon, and more reserved pasta water if needed.
Serve in bowls and garnish with black pepper.
