~/claude-code/plugins/idle-timing v0.3.0
[ plugin ]

idle-timing

Tell the model how long you've been gone.

Injects a hidden [timing] block into every prompt — local time with UTC offset, seconds idle since the last reply, duration of the previous turn. The model sees it. You don't.

42
tokens per prompt
mid-session payload, measured via gpt-tokenizer
> /plugin marketplace add clankercode/claude-inject-idle-time
> /plugin install idle-timing@idle-info
Claude Code session showing the idle-timing statusline counter and an '[after 5m 2s]' note after returning from idle
live statusline counter + visible idle note on return
[ transparency ]

two views of the same prompt

Everything in your transcript stays yours. The model gets one small block on top.

what you see transcript
you
okay where were we?
· [after 5m 2s] ·
statusline • 5m 02s since last reply
visible to you
what the model sees hook context
[timing]
time=2026-04-17T16:04:19+10:00
idle_for=302.0s
last_turn=88.2s
[/timing]

okay where were we?
injected via UserPromptSubmit

Fresh sessions omit idle_for and last_turn until the first turn completes. No prompts are modified in your chat history.

[ how it works ]

three hooks, one block

UserPromptSubmit

Injects the hidden [timing] block on every prompt. Also prints a visible [after Xm Ys] note in the TUI when you return after >10s idle.

Stop

Persists per-session timing state to disk so the next turn can compute idle_for and last_turn.

PreCompact

Resets the idle timer when Claude Code compacts context, so the counter reflects the compaction event rather than the last pre-compact reply.

[ optional ]

statusline fragment

A composable fragment that prints elapsed time since the model's last reply (45s, 3m 21s, 17m, 1h 23m). Drop into your existing statusline script — it doesn't replace one.

> /idle-time-setup

If you switch models mid-session the fragment prints --- — the original timer resumes if you switch back.