Add refreshInterval option for statusLine command
Feature Request
Problem
The statusLine command script is only re-executed on specific events (assistant responses, permission mode changes, vim mode toggles). When Claude Code is idle, the status line becomes stale — any dynamic information (e.g., rate limit reset countdowns, elapsed time) quickly becomes inaccurate.
Proposed Solution
Add an optional refreshInterval property to the statusLine configuration:
{
"statusLine": {
"type": "command",
"command": "bash \"$HOME/.claude/statusline.sh\"",
"refreshInterval": 60
}
}
refreshInterval— interval in seconds to re-run the command script- When omitted, behavior remains unchanged (event-driven only)
- The interval should be debounced/reset when an event-driven update already fires
Use Case
My status line script displays rate limit usage with countdown timers (resets_at timestamps formatted as relative time, e.g., 4h10m, 2d23h). These countdowns are only accurate at the moment the script runs. During idle periods, the displayed time drifts and becomes misleading.
A periodic refresh (even at a conservative interval like 60s) would keep dynamic status information reasonably accurate without significant overhead.
Alternatives Considered
- Embedding a background loop in the script itself — not viable since the script is invoked per-call and stdout is captured
- Accepting stale data — functional but degrades the UX of time-sensitive displays
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗