Are Habits a Kind of Attachment?
Kilesa has a residual impression which is called vāsanā which even arhats (other than the Buddha) have. Only a Buddha eliminates that. This is what drives habits. Many habits are reflexive and there no much thoughts of the intention behind it. If it is purely reflexive it does not have karmic consequences.

Initially, when you start doing something this is driven by craving. More you do it it becomes habitual. When it becomes habitual this might surface without craving.

If you think you are developing bad habits you should break them early. Deeply ingrained habits are difficult to break.