behaviornudge · Sundai Hack 148 · MIT

Catch the drift before it starts

behaviornudge learns your drift pattern from screen activity your Mac already records. It finds the moments when a purposeful visit to LinkedIn, X or Instagram turned into feed-scrolling, tests which model predicts them, and runs live: a Mac notification names the task you meant to be doing, and your clicks teach it when it was wrong. Everything runs locally; only short activity keys and trimmed titles reach two cloud services.

The trap, and where the nudges fire

A drift episode starts with a purposeful visit and counts as drift when at least 3 minutes of off-task consuming follow within 15 minutes, before you return to work for at least 60 seconds.

Creative Working on the task Zed or Ghostty on a project, a Sunsama timer, or the calendar block you planned. zed:behaviornudge
Trigger A gap opens You're in a call and attention slips, or Claude starts working and you're waiting. in a call · agent working In-call / agent nudge
Purposeful visit "Just reply to Alex" Reply to a message, look someone up, or open a link someone sent. linkedin.com/messaging Arrival nudge 20 s
Drift The feed takes over Off-task consuming: the feed, a stream of posts, reels. linkedin.com/feed · x.com/home Purpose-done · off-task
Return Back to the task The first on-task or creative session lasting 60 seconds or more. zed:behaviornudge
Purposeful visits 816 Turned into drift 259 (32%) Drift time 36 h Most drift-prone Instagram (47%) Data Apr 11 – Nov 8, 2026

Batch pipeline: learning the pattern

On your Mac · read-only sources · data/ is git-ignored

Sources

Normalize

Understand

Detect

Predict

Decide

Cloud · TypeSafe Jev

Cloud · Unbox BehaviorGPT

Egress gate — the only way out. Allowed: activity key, path class, title ≤80 chars, caption ≤500, Sunsama channel, trimmed task title (or channel-only). Never: screen text, full URLs, query strings, screenshots, HTML. Every request is written to data/audit.jsonl.

Live engine: nudging in the moment

One Python process plus a small native helper app. Rules decide when to nudge; BehaviorGPT scores every moment in shadow mode; your clicks change what happens next.

Call detection

Shadow mode

Live, today: on LinkedIn messages an arrival nudge fired after 27 s; opening the feed fired purpose-done; both clicks were recorded and BehaviorGPT scored both moments (p ≈ 0.15) through the same audited egress gate.
Component details

Select a component above

Each box shows what it does, the file that implements it, and current numbers from your data.

What the data says

BehaviorGPT vs. your own history

BaselineBehaviorGPT
ROC-AUC0.510.57
PR-AUC (base 0.31)0.330.39
Weeks won–18 of 28
Latency<1 ms450 ms

Trained on shopping, zero-shot, and it still beats a model of the user's own data. The signal is real but modest, so live it runs in shadow mode.

Where intent comes from

Share of moments, 30-minute recent-creative window.

Forgotten timers are capped: one ran overnight, 1,031 → 74 minutes actually worked.

How it learns from you

  • Too soon: that nudge waits 1.5× longer next time, in the same context (capped at 4×)
  • Legit task: becomes your own label. Nudges stop there, and backtests relabel it on-task
  • Every nudge's outcome (returned to work, or kept scrolling) is the ground truth for scoring BehaviorGPT live