The many possible causes of gummy nuts
Almonds gum profusely when wounded or diseased, whether on the trunk, branches, or nuts. Sometimes they will also produce gum for other reasons. Former UC IPM advisor Emily Symmes explains more in this Sacramento Valley Orchard Source article:
https://www.sacvalleyorchards.com/almonds/insects-mites/possible-causes-of-gummy-nuts/