You need to pick up a pickaxe and have it actively selected. Maybe adding a feature to auto-select it when trying to mine might be useful.