The habit loop is a repeating cycle of three parts: a cue that triggers a behavior, the routine (the behavior itself), and a reward that reinforces it. With repetition, the brain stores the sequence in the basal ganglia and runs it automatically, which is why habits persist and feel hard to break.
Charles Duhigg's book The Power of Habit introduced this concept as a three-step model: cue, routine, reward. Once cue, behavior and reward become neurologically intertwined, a neural pathway links the three together, which is why habits are sticky and hard to break.
What the Habit Loop Is
The habit loop is a three-part neurological process, described as trigger, behavior and reward, that the brain uses to automate repeated actions. It is the cycle through which repeated behaviors become automatic: an environmental cue triggers a stored routine in the basal ganglia, which is then reinforced.
In plainer terms, a cue triggers a routine, the routine delivers a reward, and the reward makes the next repetition more likely. That last part matters most. The loop is not just a description of a behavior; it explains why the behavior keeps coming back.
The Three Parts in Detail
Each part of the loop has a distinct job. Understanding them separately makes it easier to spot loops in your own day.
The Cue
The cue is the trigger for an automatic behavior to start. Triggers can be environmental (walking past a coffee shop, seeing your phone on the desk), emotional (stress, boredom, anxiety or loneliness), sensory (smelling food, hearing a notification), or time-based (3pm every day, first thing in the morning, before bed).
One common way of organizing cues places them into five categories: time, location, emotional state, other people, and the immediately preceding action. The last category is easy to overlook. Brushing your teeth is often the cue that prompts flossing, or reaching for your phone, depending on what has been paired with it before.
The Routine
The routine is the behavior itself. This can be a physical action, like opening the fridge, or something less visible, like mentally rehearsing a worry.
A key feature of established habits is that the behavior becomes automatic and can begin before you are consciously aware you have decided to act. That is why people sometimes find themselves scrolling on a phone before registering that they picked it up.
The Reward
The reward is what the brain gets out of the behavior. Importantly, the perceived reward is what matters, not the actual outcome: the brain learns based on what it expects to get, not what you consciously want long-term.
This explains a puzzling pattern. A habit can keep repeating even when it works against your goals, because the reward the brain registered was real in the moment (relief, stimulation, comfort) even if the long-term effect was not what you wanted.
Why Some Versions Add Craving as a Fourth Step
Duhigg's book names craving as the force that drives the loop, and James Clear's Atomic Habits turns craving into an explicit fourth step. Clear's four-step model uses the labels cue, craving, response, reward, where response is the behavior itself.
| Part | Duhigg's three-part model | Clear's four-part model |
|---|---|---|
| Trigger | Cue | Cue |
| Pull to act | Implied (craving) | Craving |
| Behavior | Routine | Response |
| Reinforcement | Reward | Reward |
The addition is useful because it separates the trigger from the motivation. Without a craving, a cue is just information; the craving is what creates the pull to act. A fire alarm test buzzing your phone is a cue that carries no craving, so you feel no urge to check it. A message notification carries one.
Everyday Examples of Habit Loops
Take phone checking. The cue might be a notification sound (sensory) or a pause in a task (preceding action). The routine is picking up the phone and opening an app. The reward is the small hit of novelty or the relief of not wondering who messaged. Repeat that enough and the brain stores the whole sequence in the basal ganglia and runs it without conscious thought.
Morning coffee follows a similar shape. The cue may be time of day or arriving in the kitchen, the routine is brewing and drinking, and the reward includes the taste, warmth and the ritual of starting the day. Bedtime scrolling often pairs a location cue and a time cue with a routine that promises relaxation, even when it delays sleep.
How Loops Form in the Brain
Habits form when the basal ganglia converts goal-directed actions into automatic routines through a process called chunking, driven by dopamine and the cue-routine-reward loop. The basal ganglia is a cluster of structures deep in the forebrain responsible for automatic learning, and it encodes repeated sequences as patterns.
Some of the clearest evidence comes from Ann Graybiel's MIT experiments with rats running a T-shaped maze for chocolate. As the behavior became habitual, brain activity shifted from the prefrontal cortex, the deliberative part of the brain, to the basal ganglia, a deeper structure that stores routines.
Recordings from that work showed a striking pattern. Activity spiked at the beginning of the maze (the cue), went quiet during the run (the routine), and spiked again at the end (the reward), suggesting the brain had compressed the middle section into a single automated chunk. Once a habit is encoded this way, the brain does not erase it; new habits are built on top of old ones.
Using the Loop to Change a Habit
The practical implication follows from the architecture. Because the basal ganglia encode the loop around the cue and reward, both can be preserved while the problematic routine is replaced with a less harmful one. Put simply: keep the cue and the reward, and swap the routine for something better.
Duhigg's own advice points the same way. He suggests changing a habit is best done by modifying an existing habit rather than trying to eliminate it, using the example of grabbing a lollipop instead of a cigarette.
A workable sequence looks like this:
- Identify the routine. Name the behavior you want to change, such as an afternoon snack.
- Experiment with the cue. Try shifting obvious variables one at a time (time, place, emotional state, other people, preceding action) to see which one reliably precedes the urge.
- Pin down the reward. Notice what the routine actually delivers, whether that is a break, stimulation, social contact or relief from tension.
- Swap the routine. Keep the same cue and aim for a comparable reward through a different behavior.
The fourth step is the one people skip. Replacing a habit with nothing removes the reward, and the loop has little reason to run the new path.
How the Habit Loop Differs from Habit Stacking
Habit stacking is a related technique that leans directly on the cue mechanism. It pairs a new behavior with an action you already do reliably, so the existing action becomes the cue.
The two ideas are complementary rather than competing. The habit loop explains the general structure of how any habit runs; habit stacking is a specific way of engineering a reliable cue for a behavior you want to build. In loop language, stacking borrows a cue you already respond to automatically and attaches a new routine to it.
Limits of the Model
The habit loop is a simplification, and individual habits vary. Most popular versions stop at the three parts, and different writers label and count the steps differently. That is not a flaw, but it does mean the model is a lens rather than a complete account.
Two limits are worth keeping in mind. First, much of the widely shared neuroscience rests on summaries of the original research rather than the papers themselves. Second, the effectiveness of habit-change techniques is described more often than it is tested in controlled trials, and how strongly any one person responds to a given cue is not well quantified.
None of that undermines the core value of the loop. It gives you a specific question to ask about any behavior you want to understand: what triggered it, what did it deliver, and what else could deliver the same thing.