Stats dashboard streak broken despite valid session data on disk

Resolved 💬 5 comments Opened Apr 15, 2026 by zk-xyz Closed May 31, 2026

Bug

The stats dashboard shows a broken streak (reset to 1d from 29d) with a gap on April 13, 2026 — but valid session JSONL files exist on disk for that day.

Evidence

6 session files exist for April 13:

| Session ID | Size | Lines | Subagents |
|------------|------|-------|-----------|
| 48ebc8aa | 2.7 MB | (binary parse) | 43 subagent files |
| 02578da7 | 2.8 MB | 583 | 14 subagent files |
| 922a98e9 | 2.6 MB | 510 | 3 subagent files |
| 9228b260 | 2.2 MB | 495 | 6 subagent files |
| 942ce2bf | 1.2 MB | 263 | — |
| 648250a7 | 118 KB | 44 | — |

These are clearly real interactive sessions with substantial content and subagent work.

Suspicious detail: All 6 files have the exact same mtime2026-04-13 21:08:51/21:08:52 — within a 1-second window. This suggests they were bulk-written (sync, migration, or backup restore?) rather than naturally closed throughout the day. The stats heatmap may be keyed off file metadata that doesn't reflect the actual session activity timestamps.

Expected behavior

The streak counter and heatmap should count April 13 as an active day, since session data with real interactive content exists for that date.

Environment

  • Claude Code version: 2.1.87
  • macOS (Darwin 24.6.0)
  • Stats dashboard shows: 325 sessions, 137K messages, 42.7M tokens, 34 active days
  • Current streak: 1d (should be 30d+)
  • Longest streak: 29d

Screenshot

The heatmap shows a clear gap day (April 13) surrounded by heavy activity on April 12 and April 14, which reset the streak counter.

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗