claude-code - 💡(How to fix) Fix statusLine: add optional periodic refresh interval [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#56375Fetched 2026-05-06 06:29:47
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×3closed ×1commented ×1

Code Example

{
  "statusLine": {
    "type": "command",
    "command": "node .claude/helpers/statusline.cjs",
    "refreshIntervalMs": 60000
  }
}
RAW_BUFFERClick to expand / collapse

Problem

statusLine currently refreshes only on event-driven triggers (assistant messages, tool calls, user input). When the session is idle — e.g. background Task subagents running in parallel, long-running tests, or async work — the statusline becomes stale and continues to display outdated counters even though the underlying data sources (transcript JSONL, cache files, project state) have changed.

This is especially noticeable for:

  • Background Task subagent counters (number of running agents)
  • Memory/vector store entry counts populated by async writes
  • Swarm coordination state files that get updated outside Claude Code's event loop
  • Long-running operations whose progress is only visible via the statusline

Request

Add an optional periodic refresh interval to statusLine config:

{
  "statusLine": {
    "type": "command",
    "command": "node .claude/helpers/statusline.cjs",
    "refreshIntervalMs": 60000
  }
}

Behavior:

  • When set (e.g. 60000), the statusline command re-runs on a timer in addition to the existing event triggers.
  • When omitted/0, current event-only behavior is preserved (no breaking change).
  • Sensible minimum (e.g. 5s) to avoid abuse.

Use case

I maintain a custom statusline (statusline.cjs) that surfaces live counts of background subagents, AgentDB vector entries, swarm registry state, and hooks status. With many parallel Task subagents running for several minutes, the user has no visual feedback until they type something — the statusline shows 0/15 agents despite 7+ active subagents. A 60s tick would make idle progress observable.

Environment

  • Claude Code 2.1.128 (Windows 10)
  • Custom statusLine command (Node.js script reading transcript + project state)

Thanks!

extent analysis

TL;DR

Add a refreshIntervalMs property to the statusLine config to enable periodic refreshes of the status line.

Guidance

  • To address the issue of a stale status line, consider adding a refreshIntervalMs property to the statusLine config, as proposed in the request.
  • Set the refreshIntervalMs value to a sensible interval (e.g., 60000) to balance between updates and potential performance impact.
  • When setting the refreshIntervalMs, ensure it is not set to 0 or omitted, as this will preserve the current event-only behavior.
  • Test the updated config with different interval values to find the optimal balance for your specific use case.

Example

{
  "statusLine": {
    "type": "command",
    "command": "node .claude/helpers/statusline.cjs",
    "refreshIntervalMs": 60000
  }
}

Notes

The proposed solution relies on the refreshIntervalMs property being implemented and functional. If this property is not available or does not work as expected, alternative solutions may be necessary.

Recommendation

Apply the proposed workaround by adding the refreshIntervalMs property to the statusLine config, as it provides a straightforward solution to the problem of a stale status line without requiring significant changes to the existing codebase.

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