Expand description
Read the cross-tool attention queue at
${XDG_CACHE_HOME:-$HOME/.cache}/claude-attention/queue.jsonl.
This file is the shared “notification inbox” produced by the
notify-stop.sh / notify-notification.sh / notify-codex.sh
hooks. Each line is one event Claude or Codex thinks the user should
eventually look at — turn finished, prompt waiting, codex response
ready. attention-picker.sh (bound to prefix + A) consumes them
via fzf with a 1-hour cutoff; we apply the same cutoff so the
dashboard agrees with the picker on “what’s pending”.
The file is append-only — entries leave only when the picker deletes them on consumption. We tolerate malformed lines (truncated writes, hand-edited junk) by skipping them.
Structs§
- Attention
Entry - One pending attention entry.
Functions§
- human_
age - Render an epoch-second timestamp as a short relative age string
(
12s,4m,2h,3d). Matches thehuman_agehelper inattention-picker.shfor visual consistency. - parse_
recent - queue_
path - Path the bash hooks write to. Mirrors
${XDG_CACHE_HOME:-$HOME/.cache}exactly — we deliberately do NOT usedirs::cache_dir()because on macOS that returns~/Library/Caches, while the shell hooks fall back to$HOME/.cacheeven on macOS. - read_
recent - Read the queue, filter to entries with
ts >= now - cutoff_secs, return newest first. Missing / unreadable file → empty Vec.