[BUG] Status line shows stale shells/monitors counters after /clear with nothing running
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
- Run a session that at some point spawns background bash tasks and/or Monitor watches.
- Let those tasks complete (or stop them).
- Run
/clear. - 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.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗