Sub topic 6
Keeping a cue log
A cue log is a short written record of each time you do the habit you want to stop, along with what was going on around it. This chapter covers what to record, when to record it, how to keep the record consistent, and the mistakes that make a log useless.
This chapter assumes you can already name a habit you want to stop and can explain the cue, routine, and reward parts of a habit loop. You should also know the five cue categories: time, location, emotional state, other people, and preceding action. Reading the log for patterns comes in the next chapter. Here the goal is only to collect good data.
Why a log and not memory
Memory reconstructs events instead of replaying them. If you try to recall last week's habit episodes at the end of the week, you will tend to remember the dramatic ones and the ones that fit your existing story. A log written at the time of the event avoids both problems.
A log also forces a fixed set of questions. Without one, you will notice whatever feels relevant that day, and the entries will not be comparable. Comparison is what makes patterns visible later.
The log has two jobs:
- It gives you data you did not filter through a theory about your own behavior.
- It interrupts the automatic behavior slightly, because you have to stop and write. That small interruption is part of building awareness, and it sometimes changes the behavior on its own.
Deciding what counts as one entry
Define an occurrence before you start. A vague definition produces inconsistent entries, and you will not be able to tell later whether a gap in the log means no habit episode or no note.
Pick a definition you can apply in a few seconds. For example:
- Nail biting: any episode where your fingers go to your mouth, however short.
- Checking social media: each time you open the app without a specific task in mind.
- Snacking: any food eaten when you were not hungry at a meal.
If a habit comes in long chains, such as scrolling for forty minutes, log the start of the chain as one entry. Add the end time in the notes field if you want it. Logging every thumb movement is not practical.
Choosing the fields
Use one field for each of the five cue categories. Add two more fields that are not cues but help later: an urge rating and a free-text note.
| Field | What to write | Example values |
|---|---|---|
| time | Time of day, as a bucket or the clock time | afternoon, 15:40 |
| place | Where you physically were | desk, sofa, car |
| mood | The feeling you can name, in one word | bored, stressed, tired |
| with | Who was present, or "alone" | alone, coworker |
| before | The last thing you did or the last thing that happened | finished a task, opened laptop |
| urge | How strong the pull was, 1 to 5 | 3 |
| notes | Anything else that stands out | phone was face up |
The urge rating is not a cue. It tells you later whether some contexts produce stronger pulls than others. Keep it to a 1 to 5 scale so you do not spend time deliberating.
Prefer short, repeatable values
Each field should take values from a small vocabulary that you reuse. If you write "bored", "kind of bored", and "restless and bored" on different days, a count by value will treat them as three different moods. Choose your words in advance, for example five or six moods, and add a new word only when none fits.
The same applies to the "before" field. "Finished a task" and "completed work item" describe the same thing. Pick one phrase.
Record the preceding action, not the thought
The "before" field is the hardest. People tend to write the reason they gave themselves ("needed a break"). That is the story you told yourself, not an observable event. Write the thing a camera would have seen: "closed email", "sat down", "phone buzzed". A rationalization can go in the notes field.
When to write the entry
Write the entry as close to the event as you can. Three timing options exist, with different trade-offs.
| Method | Accuracy | Effort | Risk |
|---|---|---|---|
| Immediately, at the moment | Highest | Highest | May feel disruptive in some settings |
| Short delay, within an hour | Good | Medium | Mood and preceding action blur |
| End of day recall | Lowest | Lowest | Misses episodes and invents tidy causes |
Start with the immediate method. If that is impractical, jot a two-word marker at the moment, such as "desk bored", and fill in the full entry within the hour. A marker is much better than nothing, because it protects the event from being forgotten. Avoid relying only on end-of-day recall.
The logging flow
The diagram below shows the sequence for one entry. The key point is that you record first and act second, when you can.
A simple tool
A paper notebook with ruled columns works. A notes app works too. If you prefer a script, the one below appends entries to a CSV file, which you can open in any spreadsheet. It fills in the time bucket automatically and rejects an urge rating outside 1 to 5, so those two fields are always consistent.
import csv
from datetime import datetime
from pathlib import Path
LOG_FILE = Path("cue_log.csv")
FIELDS = ["timestamp", "time", "place", "mood", "with", "before", "urge", "notes"]
def time_bucket(moment):
"""Map a datetime to a coarse time-of-day label."""
hour = moment.hour
if hour < 6:
return "night"
if hour < 12:
return "morning"
if hour < 17:
return "afternoon"
if hour < 22:
return "evening"
return "night"
def add_entry(place, mood, with_whom, before, urge, notes="", moment=None):
"""Append one occurrence of the habit to the CSV log."""
if not 1 <= urge <= 5:
raise ValueError("urge must be between 1 and 5")
moment = moment or datetime.now()
is_new = not LOG_FILE.exists()
with LOG_FILE.open("a", newline="", encoding="utf-8") as f:
writer = csv.DictWriter(f, fieldnames=FIELDS)
if is_new:
writer.writeheader()
writer.writerow({
"timestamp": moment.isoformat(timespec="minutes"),
"time": time_bucket(moment),
"place": place,
"mood": mood,
"with": with_whom,
"before": before,
"urge": urge,
"notes": notes,
})
if __name__ == "__main__":
add_entry(
place="desk",
mood="bored",
with_whom="alone",
before="finished a task",
urge=3,
notes="phone face up",
moment=datetime(2026, 11, 23, 15, 40),
)
print(LOG_FILE.read_text(encoding="utf-8"))Running it creates cue_log.csv and prints:
timestamp,time,place,mood,with,before,urge,notes
2026-11-23T15:40,afternoon,desk,bored,alone,finished a task,3,phone face upThe moment argument lets you back-fill an entry with the time it actually happened. Without it, the script uses the current time, which is wrong if you are finishing an entry an hour late.
The tool is optional. If typing a command is more friction than a pen, use the pen. A log you keep is worth more than a well-designed log you abandon.
How long to log
Log every occurrence for at least one week and preferably two. A week covers each weekday once. Two weeks lets you see whether a pattern repeats or was one unusual week.
Do not stop early because you think you already know the cue. The purpose of the log is to test that belief against data. People often find that the cue they assumed is present in only some entries and a different one is present in most.
A rough guide for the number of entries: with fewer than about 15 entries, patterns are weak and easy to over-read. If your habit happens only a few times a week, extend the period until you reach that count.
Common errors
Logging only the bad episodes
If you write an entry only when you feel guilty about the habit, you miss the quiet, automatic episodes. Those are often the most informative, because they happen with the least conscious thought. Log every occurrence under your definition, including the ones that feel trivial.
Changing the behavior and the log at once
Logging may reduce the habit a little. That is fine. Do not also try a new strategy during the logging weeks, such as moving the phone or banning the habit. If you change the surroundings now, the cues you record will reflect the changed setting, and you will not learn what the original cues were. Observe first and plan changes afterward.
Writing interpretations instead of observations
"Stressed about the deadline" bundles a mood with an explanation. Record "stressed" in the mood field and the deadline in the notes. The same goes for "because". If you notice yourself writing it, move that part to the notes.
Leaving fields blank
A blank is ambiguous. It might mean "not applicable", "I did not notice", or "I forgot". Use explicit values: "alone" when nobody was there, "unsure" when you could not tell. Later, a count of "unsure" tells you how reliable a field is.
Inventing a vocabulary as you go
Adding a new label for each entry produces a log in which every row is unique. Settle on your values in the first day or two, then reuse them.
Skipping the log when it is inconvenient
Missing entries are not random. You are most likely to skip the log in the situations where the habit is strongest, such as when you are rushed or upset. If you miss one, add an entry marked "late, approximate" in the notes. Do not leave a gap and hope it does not matter.
Privacy and honesty
The log is for you. Entries about mood or other people can be sensitive, so store the file or notebook somewhere private. You will be more honest if you know nobody else will read it. If you are tempted to soften an entry, remember that the log only helps if it matches what happened.
A worked entry
Suppose your habit is snacking at your desk. At 15:40 you notice a half-eaten packet of crackers.
- Write the marker: "desk crackers".
- Fill in the fields: time afternoon, place desk, mood bored, with alone, before "finished a task", urge 3.
- Add a note: "no lunch gap, ate at 12:30".
Notice what you left out. You did not write "I deserved a break" in the "before" field, and you did not conclude that boredom is the cue. One entry cannot support that. You are only recording.
Exercise
You log your habit only at the end of each day, from memory, and you write "needed a break" in the "before" field. Name two problems with this approach and how to fix each.
Show answer
First, end-of-day recall misses episodes and fills gaps with tidy explanations. Fix it by writing a short marker at the moment and completing the entry within an hour. Second, "needed a break" is a reason you gave yourself, not an observable event. Fix it by recording what a camera would have seen, such as "closed email", and moving the reason to the notes field.
Exercise
After four days of logging, you realize you have been skipping the log whenever you were in a hurry. What should you do, and why does it matter?
Show answer
Add late entries marked "late, approximate" for the missed episodes where you can, and use a quick marker next time you are rushed. It matters because the skipped entries come from the situations where the habit is strongest, so leaving them out would bias the pattern you find later.