Ergothioneine is heat stable, which means it’s not destroyed when mushrooms are cooked.29 This is good news, because it’s best not to eat mushrooms raw; there’s a toxin in edible mushrooms called agaritine to which you should minimize your exposure. Thankfully, the toxin is destroyed by cooking.