Preparation Heat oil in a large skillet over medium heat. Add onion and cook, stirring often, until soft but not brown, 6-8 minutes. Add garlic, basil, thyme, and tarragon sprigs, star anise, and clove, and cook, stirring often, until fragrant, about 2 minutes. Add tomatoes and vinegar. Cook, stirring occasionally, until tomatoes release their juices and a sauce forms, 10-15 minutes. Discard thyme, tarragon, and basil sprigs, star anise, and clove. Season sauce with salt and pepper. Meanwhile, cook spaghetti in a large pot of boiling salted water, stirring occasionally, until al dente. Drain, reserving 1 cup pasta cooking liquid. Add pasta and 1/2 cup pasta cooking liquid to sauce in skillet. Cook, tossing and adding more pasta cooking liquid as needed, until sauce coats pasta, about 2 minutes. DO AHEAD: Sauce can be made 1 day ahead. Cover and chill. Reheat before tossing with spaghetti.
Preparation Heat oil in a large skillet over medium heat. Add onion and cook, stirring often, until soft but not brown, 6-8 minutes. Add garlic, basil, thyme, and tarragon sprigs, star anise, and clove, and cook, stirring often, until fragrant, about 2 minutes. Add tomatoes and vinegar. Cook, stirring occasionally, until tomatoes release their juices and a sauce forms, 10-15 minutes. Discard thyme, tarragon, and basil sprigs, star anise, and clove. Season sauce with salt and pepper. Meanwhile, cook spaghetti in a large pot of boiling salted water, stirring occasionally, until al dente. Drain, reserving 1 cup pasta cooking liquid. Add pasta and 1/2 cup pasta cooking liquid to sauce in skillet. Cook, tossing and adding more pasta cooking liquid as needed, until sauce coats pasta, about 2 minutes. DO AHEAD: Sauce can be made 1 day ahead. Cover and chill. Reheat before tossing with spaghetti.