Yes, this is a slight weakness in the AI. Short of watching your farmer like a hawk and dragging him to the crops every time there's not much you can do.

I avoid the issue by not getting L2 farming at this stage. I wait until I've got enough points for L3 as well, then buy them both together. Of course, if it looks as though my villagers will starve, I'll get the coconuts early, but that's only happened a couple of times when a farmer fell sick and food dropped to zero.
_________________________
To err is human; to arr is pirate.