You snapped, or reached for the phone, or said yes again, and afterwards it reads as a choice: a decision taken badly, to be taken better next time with a little more will.
Watch one of those moments closely, though, and the order can look the other way round: the reaction had already finished before any choosing started, and what felt like deciding was closer to noticing, a beat late, what the mind had already done. Yoga philosophy has two words for moments like that, and between them they say where a pattern comes from and where the work on it actually is.
A mental impression (Samskara) is the trace a past experience leaves in the mind, the tradition's reason a reaction can feel automatic before you have chosen it. This page pictures it as a groove: every time you run a pattern, the groove deepens. Practice works directly with samskaras: not by force, but by laying down new, cleaner grooves until the old ones quieten.
A deep tendency (Vasana) runs deeper still: the accumulated shape of character, the inherited flavour of how a particular mind tends to move. A common way of teaching the pair, and the one this page uses: many samskaras of a kind settle into a vasana.
Together they are why change is slow but real. You are not fighting a single thought; you are re-grooving a riverbed. The law that carries these grooves forward is Karma; the habit mechanism in practical, daily form lives at sense withdrawal (Pratyahara).