Sub topic 2
How a Habit Works: Cue, Craving, Response, Reward
This chapter assumes you know what a habit is: something you do with little deliberate thought. It also assumes you are willing to watch your own behavior for a week or two. You don't need any background in psychology. The Python example is short and optional.
The previous chapter separated outcome goals, process goals and identity goals. This chapter covers the mechanism underneath all three, a four-step loop that repeats every time a habit runs. Later chapters on identity statements, if-then plans and environment design each work by changing one step of this loop.
The four steps
A habit is a loop with four steps:
- Cue. A signal that points to a behavior. It can be a time, a place, a person, an emotion, a preceding action, or an object in view.
- Craving. The wish for a change in state that the cue triggers. You don't crave the habit itself. You crave how you expect to feel afterward.
- Response. The action you take. It can be a thought or a physical act.
- Reward. The outcome that satisfies the craving and teaches your brain to repeat the loop.
The loop is a working model, not a law of nature. It borrows from the "cue, routine, reward" pattern popularized by Charles Duhigg and from the four-step version James Clear uses. Researchers describe the underlying learning in more detail. The model is still useful because it tells you where to intervene when a habit isn't working.
The arrow from reward back to cue is what makes this a loop. Each time the response is followed by a reward, the connection between that cue and that response gets stronger. After enough repetitions the cue alone can start the whole sequence without a decision.
Each step in detail
Cue
A cue is information. It tells you that a reward is available nearby. Cues are often invisible to the person who has them, because the behavior runs automatically. You may reach for your phone without noticing that the trigger was a short silence in a conversation.
Common cue types:
- Time. "It is 3 p.m."
- Location. "I am in the kitchen."
- Preceding event. "I just finished a meeting."
- Emotional state. "I feel anxious."
- Other people. "A colleague is taking a break."
- Objects. "My running shoes are by the door."
A useful cue is specific and noticeable. "Sometime in the evening" is a weak cue. "I close my laptop at the end of the workday" is a strong one.
Craving
The craving is the motivational part of the loop, and people often skip it when they design habits. Two people can see the same cue and react differently, because they want different things. A cigarette in someone's hand is a cue. Only a person who associates smoking with relief craves it.
A craving is a desire for a change in state, such as less tension, more energy, social connection or a sense of progress. This is why "I should exercise" fails as a plan. It names the response but gives you no craving to drive it. A craving such as "I want to feel awake and in control before work" gives the response a reason.
Response
The response is the behavior itself. Two factors decide whether it happens: how motivated you are (the craving) and how much effort the response takes. If the action needs more effort than you can spare right now, it doesn't happen, however strong the craving. The chapter on the minimum version of a habit builds on this point.
Reward
The reward does two jobs. It satisfies the craving, and it teaches. A reward that satisfies feels good now. A reward that teaches leaves you more likely to repeat the loop when the cue returns.
Habits that serve you tend to have a delayed reward, such as health, skill or savings. Habits that hurt you often have an immediate one, such as relief, novelty or entertainment. The loop learns from what comes quickly, so an immediate reward often beats a larger one that arrives months later. This is why many good habits need a small, immediate reward added to them.
The steps at a glance
| Step | Question it answers | Typical failure | Design lever |
|---|---|---|---|
| Cue | What tells me to act? | The cue is vague or missing | Make it obvious and specific |
| Craving | Why do I want to act? | The behavior feels pointless | Link it to a feeling you want |
| Response | What exactly do I do? | The action is too big or too hard | Make it small and easy |
| Reward | What do I get right away? | The payoff is distant or unnoticed | Add a small, immediate payoff |
When a habit fails, ask which row fails first. Most people jump to "I lack willpower", which describes none of the four steps.
A worked example: comparing two loops
Take two habits that start from the same cue, opening your laptop at 9 p.m.
Loop A: scrolling news and social media.
- Cue: laptop opens, and the browser shows your usual tabs.
- Craving: relief from the day and a little novelty.
- Response: click the first tab.
- Reward: instant stimulation and a feeling of being informed.
Loop B: writing for ten minutes.
- Cue: laptop opens (the same cue).
- Craving: weak. You vaguely feel you should write.
- Response: open a document, decide what to write, start. This takes effort.
- Reward: delayed. You may feel progress in a week, or not.
Loop A wins every time. All four steps are in place, the response takes one click, and the reward arrives immediately. Loop B has a weak craving, a demanding response and a distant reward. The cue is the same, so the cue is not the problem.
To fix Loop B, you change specific steps. You could open the document before closing the laptop the night before, so the cue shows a blank page instead of a browser. You could shrink the response to "write one sentence". You could add an immediate reward, such as ticking a box on a calendar. These are the same moves the next chapters describe in detail.
Modeling the loop in code
The sketch below stores a habit as four fields and reports which steps are empty. It is a thinking aid, not a tracking tool.
from dataclasses import dataclass
STEPS = ("cue", "craving", "response", "reward")
@dataclass
class HabitLoop:
name: str
cue: str
craving: str
response: str
reward: str
def missing_steps(self):
return [step for step in STEPS if not getattr(self, step).strip()]
loops = [
HabitLoop(
name="morning run",
cue="I pour my morning coffee",
craving="I want to feel awake and in control",
response="put on running shoes and go for 10 minutes",
reward="a checkmark on my calendar and a clear head",
),
HabitLoop(
name="evening writing",
cue="I open my laptop at 9 p.m.",
craving="",
response="write for ten minutes",
reward="",
),
]
for loop in loops:
missing = loop.missing_steps()
if missing:
print(f"{loop.name}: missing {', '.join(missing)}")
else:
print(f"{loop.name}: all four steps defined")Running it prints:
morning run: all four steps defined
evening writing: missing craving, rewardFilling in all four fields doesn't guarantee a habit will stick. But a field you can't fill in is a good place to start looking.
Common errors
Treating the response as the whole habit. People say "my habit is meditation" and describe only the response. Without a defined cue and a satisfying reward, nothing links the action to a time or a reason.
Confusing the cue with the craving. A cue is something you notice. A craving is something you feel. "My phone buzzes" is a cue. "I want to know what I missed" is the craving. The distinction matters because you can change a cue by moving your phone, but changing a craving takes a different approach.
Relying on a distant reward. "I will be healthier in a year" is a real reason but a weak loop reward. If nothing satisfying happens within minutes, the loop receives little reinforcement. A small immediate payoff, such as a mark on a tracker, helps bridge the gap.
Assuming every habit has a clean cue. Many habits have several cues, and some are internal and hard to spot. If you can't name the cue for a behavior you want to change, keep a short log for several days. Note where you were, what time it was, how you felt and what you had just done each time the behavior occurred.
Expecting one loop to run alone. Habits chain together. The reward of one loop, such as finishing breakfast, often becomes the cue of the next, such as brushing your teeth. This is the basis of habit stacking, covered in a later chapter.
How the loop connects to identity
The loop explains how a behavior repeats. It does not explain why you picked this behavior or why you stay with it. Identity answers that.
Each time you complete a loop, you also collect a piece of evidence about yourself. A person who runs after pouring coffee for thirty days has a record of acting like a runner. The next chapter builds on this by treating each completed loop as a vote for a self-image. In turn, the self-image you hold shapes which cues you notice and which cravings feel natural. A person who sees themselves as a writer notices a blank page as an invitation and not as a chore.
So the two ideas support each other. The loop supplies the repetitions, and identity supplies the reason to keep repeating them.
Exercise
You want to read a book for 15 minutes each evening, but you usually pick up your phone instead. Describe the phone habit as a four-step loop. Then name which one step you would change first to make reading more likely, and why.
Show answer
One possible answer. Cue: sitting down on the sofa after dinner with the phone within reach. Craving: relief from the day and a wish for light stimulation. Response: pick up the phone and scroll. Reward: instant novelty. The first step to change is the cue, because it is the easiest to control. Put the phone in another room and leave the book on the sofa cushion, so the sofa cues reading instead. Changing the response (reading one page) is a good second step. Any answer that identifies all four steps and picks one step with a reason is acceptable.
Exercise
A habit tracker shows that you do a 5-minute stretch every day at work, but only on days when a calendar reminder appears. On days without it, you skip it. Which step of the loop is the reminder acting on, and what does this suggest about the strength of the habit?
Show answer
The reminder acts on the cue. The stretch happens only when an external cue is present, which suggests the loop is not yet automatic. Your own craving or an internal cue, such as feeling stiff after an hour at the desk, has not yet become strong enough to start the behavior. To strengthen it, you could pair the stretch with a reliable existing event, such as standing up after a meeting, and add a small immediate reward, such as noting how you feel afterward.