claude-code - 💡(How to fix) Fix Feature request: statusLine.refreshInterval for idle auto-refresh [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#53034Fetched 2026-04-25 06:14:10
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Author
Timeline (top)
labeled ×2commented ×1

Fix Action

Fix / Workaround

Why workarounds don't solve this

Code Example

{
  "statusLine": {
    "type": "command",
    "command": "/Users/me/.claude/statusline/statusline.sh",
    "refreshInterval": 60
  }
}
RAW_BUFFERClick to expand / collapse

Feature request: statusLine.refreshInterval for idle auto-refresh

Problem

Claude Code's statusLine command only runs on message/tool events. Statusline scripts that display time-sensitive values, most importantly rate-limit countdowns (Session Limit: 51% (reset 27m), Weekly Limit: 7% (reset 6d 3h)), visibly freeze the moment a user stops interacting. A user sitting in a Claude Code session for 30+ minutes of reading or thinking sees a "reset 27m" that hasn't ticked down at all, or worse, is negative by now.

The displayed values are computed live from resets_at epoch timestamps inside the script, so the data side is fine. The freeze is purely on the UI redraw side. Claude Code doesn't invoke the command again until the next event.

Why workarounds don't solve this

  • Hooks (PreToolUse, PostToolUse, SessionStart, etc.) fire on events, not timers. No way to self-trigger a redraw.
  • External menu-bar / tmux bars (SwiftBar, xbar, tmux status-right) can auto-refresh on their own cadence, but they live outside Claude Code's UI. Users looking at the terminal pane still see stale countdowns.
  • ScheduleWakeup / CronCreate can fake it by firing dummy turns, but consumes tokens per wake-up and clutters the transcript.

None of these covers "fresh statusline inside every Claude Code terminal window."

Proposed solution

Add an optional refreshInterval (or pollInterval) field to the statusLine config block in settings.json:

{
  "statusLine": {
    "type": "command",
    "command": "/Users/me/.claude/statusline/statusline.sh",
    "refreshInterval": 60
  }
}

Value in seconds. When set, Claude Code re-invokes the command every N seconds while the session is active, even when idle. Existing event-based invocations continue to fire as normal (so users with dynamic rate-limit data get the fresher of the two).

Sensible defaults: minimum 15s (to prevent abusive configs), no default (backwards-compatible; absence preserves current behavior).

Use cases beyond rate limits

  • Git branch changes detected in a side project (statusline reflects git rev-parse --abbrev-ref HEAD freshly)
  • Live token cost accrual if displayed
  • Active pipeline/build status polled from a local cache
  • Any clock or countdown

Priority

Low severity (not blocking anyone), but high delight. The kind of polish that makes the terminal UI feel alive rather than frozen. Every statusline user who displays time-sensitive data hits this.

extent analysis

TL;DR

Adding a refreshInterval field to the statusLine config block in settings.json can enable periodic refresh of the status line, even when idle.

Guidance

  • To address the issue of stale countdowns, consider adding a refreshInterval field to the statusLine config block, specifying the desired refresh interval in seconds.
  • The proposed solution suggests a minimum interval of 15 seconds to prevent abusive configurations.
  • Implementing this feature would require updates to the Claude Code application to periodically re-invoke the statusLine command based on the specified interval.
  • Users can test this feature by adding the refreshInterval field to their settings.json and verifying that the status line updates at the expected interval.

Example

{
  "statusLine": {
    "type": "command",
    "command": "/Users/me/.claude/statusline/statusline.sh",
    "refreshInterval": 60
  }
}

Notes

The implementation of this feature may require additional considerations, such as handling cases where the refreshInterval field is not specified or is set to an invalid value.

Recommendation

Apply workaround by adding the proposed refreshInterval field to the statusLine config block, as this provides a straightforward solution to the issue of stale countdowns and can be easily tested and verified.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Feature request: statusLine.refreshInterval for idle auto-refresh [1 comments, 2 participants]