Stats heatmap counts a day active only if a session STARTED that day — days spent entirely in resumed sessions show 0 and break the streak
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The usage stats screen (heatmap / current streak) appears to bucket
activity by the session's START date rather than by each message's own
timestamp.
Repro: work for a full day entirely inside a long-running session that
was started on an earlier day (resume across midnight, no new session
that day). The day shows 0 activity in the heatmap even though the
transcript contains real user/assistant messages timestamped that day,
and the current-streak counter breaks at it.
Concrete case: a day with 4 sessions / 428 message-lines (verified in
~/.claude/projects/**/*.jsonl, timestamps 06:49–17:25 UTC) rendered as
"0" because zero sessions had their first message on that date — all
activity lived in sessions started 5 days earlier.
Expected: a day is "active" if any message timestamp falls on it,
regardless of when the containing session started.
Env: claude-code 2.1.165, macOS.
What Should Happen?
A day in the usage stats should count as "active" if any message in any
transcript has a timestamp on that calendar day — regardless of when the
session that contains it was started.
Activity should be attributed per-message-timestamp, not per-session-
start date. A day worked entirely inside a long-running session that was
resumed from an earlier day should still light up in the heatmap and keep
the current streak intact.
Error Messages/Logs
A day in the usage stats should be counted as "active" if any message in
any transcript has a timestamp on that calendar day — regardless of when
the containing session was started.
Currently the heatmap / streak counter appears to bucket activity by the
session's START date, so a day spent entirely inside a long-running
session that was resumed from an earlier day shows 0 activity and breaks
the current-streak counter, even though that day's transcript contains
real user/assistant messages.
Expected: activity is attributed per-message-timestamp, not per-session-
start. Days worked entirely within resumed sessions should light up in
the heatmap and keep the streak intact.
Steps to Reproduce
- Start a Claude Code session on day A (e.g. May 26) and do some work.
- Keep that same session running and resume it over the following days
WITHOUT starting any new session — i.e. on day B (e.g. May 31) do all
your work inside that already-open session, across the midnight
boundary. (No new session has its first message on day B.)
- Confirm real activity exists on day B: the transcript files in
~/.claude/projects/**/*.jsonl contain user/assistant messages with
timestamps on day B (in my case 4 sessions, 428 message-lines,
06:49–17:25 UTC).
- Open the usage stats / heatmap screen.
Result: day B shows 0 activity in the heatmap and the current-streak
counter breaks at day B — even though day B has real messages. Every
neighbouring day (which had at least one session START that day) is
counted correctly. The only distinguishing factor of day B is that zero
sessions had their FIRST message on it.
Env: claude-code 2.1.165, macOS.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
claude-code 2.1.165
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗