Why it exists
Long sessions with a coding agent have no natural pauses. There is always one more prompt, and two hours go by in a chair.
A model cannot fix this by itself, because it cannot measure time: between one reply and the next it sees only the conversation, never the clock. A hook can. It runs in the harness on every prompt, in milliseconds, with access to the filesystem. So the hook does the timing and hands Claude one line of context when a break is due.
That is also why the reminder works. It arrives inside the next reply, in the place you are already reading, and not in a notification you will ignore.
What it looks like
After 90 minutes of active work, the hook adds one line to the context of your next prompt:
break-time: 90 minutes deep. Stand up. Walk for five. Your
brain needs the reset more than the next prompt.
Claude mentions the break in one sentence at the start of its reply, then answers what you asked. It does not repeat it, shorten the answer or bring it up again until the hook sends another.
How the timing works
- The hook records the start of the active session. Ten minutes without a prompt starts a new one.
- On every prompt it computes the time worked in the current session.
- When a threshold is crossed (45, 90 and 120 minutes by default) it prints one reminder. Each threshold fires once per session.
- While snoozed, it keeps counting and prints nothing.
Commands
| Say | Effect |
|---|---|
/break-time |
The state: time worked this session, next threshold, snooze status |
/break-time next, “when’s my next break” |
When the next reminder fires, and whether a snooze will mute it |
/break-time snooze 60, “snooze break-time” |
Silence reminders for that many minutes, 60 by default |
/break-time reset, “I’m taking a break now” |
Treat now as the start of a new session |
/break-time configure |
Help editing the configuration file |
Install
This skill is a hook plus commands to manage it, so it needs Claude Code, a local install and bash. Git Bash on Windows is enough.
- Install the skill:
./install.sh break-time, or.\install.ps1 -Skills break-timeon Windows. - Merge this block into
~/.claude/settings.json. Merge it; do not replace the file. - Restart Claude Code.
{
"hooks": {
"UserPromptSubmit": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "bash ~/.claude/skills/break-time/scripts/check_break.sh"
}
]
}
]
}
}
To turn it off, remove the block. The files can stay; without the hook they do nothing.
Configuration
~/.claude/break-time.conf is optional. The defaults:
THRESHOLDS="45 90 120" # minutes worked at which to remind
IDLE_GAP=10 # minutes without a prompt that start a new session
STYLE=friendly # friendly | aggressive | poetic
The style changes the wording. aggressive at two hours says “TWO HOURS. THIS IS NOT A SUGGESTION. STAND UP.” and poetic sends a haiku:
ninety in the chair
the river outside is moving
so should you, briefly
HOOKS-101
The skill ships with HOOKS-101.md, the document I wanted when I first tried to write a hook. It covers what a hook is, the events you can attach to, where hooks live, how to keep state between invocations, how to debug a hook that fails silently, and a walkthrough that builds this one from scratch. It is worth reading even if you never install the skill.
What it will not do
- Block a prompt. The hook always exits 0, so a failure costs you nothing but the reminder.
- Leave your machine. It reads and writes
~/.claude/break-time.state, logs errors to~/.claude/break-time.logand makes no network access. - Pretend to keep time without the hook. Loaded anywhere else, the skill says that it needs a local Claude Code install instead of guessing at elapsed time.