Cook pasta or rice according to package directions. Cook pasta al dente only. Reserve ½ cup pasta water if using noodles.
Sauté mushrooms: In a large skillet over medium heat, add mushrooms, ¼ cup broth, and a pinch of salt. Cook until broth evaporates and mushrooms lightly brown (5–7 minutes). Remove and set aside.
Sear the cod: Season cod with salt and pepper. Heat ghee over medium-high heat and sear cod 1–2 minutes per side until lightly golden. Remove from pan (do not fully cook).
Build the flavor base: Reduce heat to medium. Add diced onion with a pinch of salt and cook 3–4 minutes until softened. Add garlic and cook 30 seconds until fragrant.
Make the sauce: Stir in coconut milk, remaining ½ cup broth, nutritional yeast, arrowroot, lemon zest, and herbs. Simmer 2–3 minutes until lightly thickened.
Finish the cod: Return mushrooms and cod to the skillet. Add lemon slices if using. Cover and gently simmer 4–6 minutes (longer for frozen cod), flipping once. Remove lemon slices.
Finish & serve: Stir in lemon juice and optional capers or Dijon. Taste and adjust salt. Toss with pasta (add pasta water if needed) or spoon over rice. Finish with fresh herbs and cracked pepper.