Freeze ice cream maker base overnight.
In a small bowl, mix ½ cup coconut milk with cornstarch. Set aside.
Add remainder of coconut milk to a medium pan. Warm coconut milk over medium-low heat for 1–2 minutes, whisking to incorporate the solids Add agave syrup and coconut sugar. Break chocolate into pieces. Add to coconut milk. Stir until thoroughly combined. Whisk in cocoa powder, then cornstarch mixture. Heat until chocolate mixture is thickened, 6–8 minutes (do not boil).
Remove from heat. Stir in vanilla. Strain through a fine-mesh sieve into a 1-gallon sealable plastic bag. If churning immediately, place bag in an ice bath for 30 minutes until cool; if churning the next day, refrigerate 4 hours or overnight (mixture should be as cold as possible before churning).
Churn mixture in an ice cream maker until it thickens to the consistency of soft serve, adding chopped pistachios and sea salt crystals as mixture churns.
Eat immediately for a soft serve consistency. For a hard ice cream texture, freeze using the following instructions: Press a piece of parchment or wax paper into a sealable container, then scrape ice cream into container using a spatula, making sure to scrape in the bits frozen to the edges of the ice cream maker base. Freeze 4 hours for a hard ice cream texture.