From a reader:

Jonah–
The legume-o-philes will have to give this one up. Despite their superficial resemblance to the vile peanut, cashews are not legumes. They belong in the family Anacardiaceae, along with pistachios, mangos, sumac, and poison ivy. By any reasonable view, of course, you’re right: “nut,” like “bug,” is a term of function, not biology. But those who want to insist on foolish pedantry can at least be accurate about it.