I kept noticing Cursor “stop listening” mid-session — ignoring a rule I’d set, or going off and building its own version of something I’d already told it how to do — but I never had anything showing me when that started, just a feeling it was happening. So I built something to actually watch for it instead of guessing.
It’s built on Cursor’s own Hooks API, not anything reverse-engineered. A handful of hooks (sessionStart, beforeSubmitPrompt, afterFileEdit, afterShellExecution, preCompact, stop) log what happened locally — what you asked, what actually got touched, and the exact moment Cursor compresses its context window (preCompact hands you the real numbers: token usage %, message count). It also drops a short reminder of your project rules at session start, and can warn you when compaction is about to happen. A report command then flags turns where your very next prompt reads like a correction, so you can see whether that clusters around compaction events or not.
It can’t make Cursor follow your rules — that’s not something a hook can do, and I wasn’t trying to build an enforcer. It just watches, locally, and tells you what it saw. Every hook always answers continue: true; nothing here blocks or changes what the agent does.
MIT licensed, nothing leaves your machine, v1.0.0:
Install is in the README (Node.js LTS, then INSTALL.bat / ./install.sh). First post here — I built this for my own use, figured others hitting the same thing might want it too. Feedback, or “here’s what it missed,” welcome.