claude-code - 💡(How to fix) Fix statusLine.refreshInterval re-runs the command but does not repaint the display [2 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#48445Fetched 2026-04-16 06:59:58
View on GitHub
Comments
2
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×5commented ×2

When statusLine.refreshInterval is configured, the statusline command is re-executed on the timer interval as expected. However, the terminal statusline area is not visually repainted when the script output changes — the new output is only rendered on the next user interaction event (e.g., sending a message or a tool call completing).

Root Cause

When statusLine.refreshInterval is configured, the statusline command is re-executed on the timer interval as expected. However, the terminal statusline area is not visually repainted when the script output changes — the new output is only rendered on the next user interaction event (e.g., sending a message or a tool call completing).

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code (2.1.109)

Summary

When statusLine.refreshInterval is configured, the statusline command is re-executed on the timer interval as expected. However, the terminal statusline area is not visually repainted when the script output changes — the new output is only rendered on the next user interaction event (e.g., sending a message or a tool call completing).

Steps to reproduce

  1. Configure a statusline command that reads the current permissionMode from the session transcript JSONL (e.g., via grep '"permissionMode"' <transcript> | tail -1).
  2. Set "refreshInterval": 3 in settings.json.
  3. Press Shift+Tab to cycle through permission modes (default → plan → auto → etc.).
  4. Observe: the statusline label does not update within 3 seconds.
  5. Send any message — the statusline immediately shows the correct (new) mode.

Expected behavior

When refreshInterval fires and the script produces different output than the previous run, Claude Code should repaint the statusline area to reflect the new content — without requiring a user interaction.

Actual behavior

The statusline command is re-executed (confirmed via debug logging) but the terminal display is not updated until the next UI event.

Impact

Any statusline data that changes independently of user messages — such as permission mode changes via Shift+Tab, external process state, or time-based values — cannot be reflected in real time. The refreshInterval option exists specifically for this use case, so the missing repaint makes it largely ineffective.

Environment

  • Claude Code version: 2.1.109
  • Platform: Linux (Ubuntu)

extent analysis

TL;DR

The issue can be mitigated by forcing a repaint of the terminal statusline area after the statusline command is re-executed on the timer interval.

Guidance

  • Investigate the Claude Code rendering mechanism to determine why the statusline area is not repainted after the script output changes.
  • Check if there is an API or function available to manually trigger a repaint of the statusline area, which could be called after the statusline command is re-executed.
  • Consider adding debug logging to verify that the statusline command is producing the expected output and that the repaint issue is not related to the command itself.
  • Review the refreshInterval implementation to ensure it is correctly triggering the statusline command and handling the output.

Example

No code snippet is provided as the issue does not contain sufficient information about the Claude Code API or implementation details.

Notes

The issue seems to be related to the rendering mechanism of Claude Code, and without more information about the internal implementation, it is difficult to provide a definitive solution. The guidance provided is aimed at helping the developer investigate and potentially mitigate the issue.

Recommendation

Apply workaround: The best course of action would be to try to force a repaint of the statusline area after the statusline command is re-executed, potentially using an API or function provided by Claude Code. This would allow the refreshInterval option to function as intended, even if it is not the ideal solution.

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…

FAQ

Expected behavior

When refreshInterval fires and the script produces different output than the previous run, Claude Code should repaint the statusline area to reflect the new content — without requiring a user interaction.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING