Heat the olive oil in a large skillet over low heat.
Add the garlic cloves, pitted black olives, and well-rinsed capers to the skillet and sauté gently for 2–3 minutes until fragrant; add red chili flakes if using.
Pour in the whole canned tomatoes and add the basil leaves; use the back of a wooden spoon to break the tomatoes into chunks.
Cover and simmer the sauce on low heat for about 15 minutes, stirring occasionally.
In the last few minutes of simmering, remove and discard the garlic cloves, then add the drained tuna and gently stir to combine; season with sea salt and freshly cracked black pepper to taste.
Meanwhile, bring a large pot of lightly salted water to a boil and cook the spaghetti according to the package directions, then drain the pasta about 2 minutes before the package time for al dente.
Add the drained spaghetti to the tuna puttanesca sauce and toss until evenly coated.
Serve topped with the chopped parsley and an extra crack of black pepper if desired.