claude-code - 💡(How to fix) Fix [BUG] Status line shows stale shells/monitors counters after /clear with nothing running

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…

The Claude Code built-in status line continues to display non-zero "shells" and "monitors" counters even when there are no background tasks, cron jobs, or monitor processes actually running. The counters appear to be sticky / not reset by /clear.

Root Cause

The Claude Code built-in status line continues to display non-zero "shells" and "monitors" counters even when there are no background tasks, cron jobs, or monitor processes actually running. The counters appear to be sticky / not reset by /clear.

RAW_BUFFERClick to expand / collapse

Summary

The Claude Code built-in status line continues to display non-zero "shells" and "monitors" counters even when there are no background tasks, cron jobs, or monitor processes actually running. The counters appear to be sticky / not reset by /clear.

Repro

  1. Run a session that at some point spawns background bash tasks and/or Monitor watches.
  2. Let those tasks complete (or stop them).
  3. Run /clear.
  4. Observe the status line still shows e.g. 2 shells, 2 monitors.

Expected

After /clear, the counters should reflect the current state — 0 shells, 0 monitors when nothing is active.

Actual

Counter stays at the previous value indefinitely.

Evidence from this session

After /clear, the status line showed 2 shells, 2 monitors, but:

  • CronList → cleared (only one one-shot cron existed; deleted)
  • TaskList → "No tasks found"
  • ps -ef | grep -E 'tail -f|inotify|monitor|while true' → no matches

So no background work was actually live — the counter was stale.

Environment

  • Claude Code: Opus 4.7 in CLI
  • Platform: Linux 6.17.0-29-generic
  • Shell: bash

Impact

Cosmetic, but misleading — users (and Claude) cannot tell from the status line whether background work is genuinely active or the indicator is stuck.

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 [BUG] Status line shows stale shells/monitors counters after /clear with nothing running