[BUG] Streak/heatmap "active days" tracker misattributes multi-day sessions to their start date

Status Open
Reported on v2.1.209
Maintainer reply None cached
Activity 0 comments · opened Jul 30, 2026

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 activity heatmap and streak counter appear to bucket a session's activity by its creation timestamp only, rather than by every calendar day the session actually had activity. A session that starts late at night and runs into the next day gets all its credit dumped on the start day — the following day, where most of the actual work happened, shows blank.

What Should Happen?

The activity heatmap and streak counter appear to bucket a session's activity by its creation timestamp only, rather than by every calendar day the session actually had activity. A session that starts late at night and runs into the next day gets all its credit dumped on the start day — the following day, where most of the actual work happened, shows blank.

Error Messages/Logs

The activity heatmap and streak counter appear to bucket a session's activity by its *creation* timestamp only, rather than by every calendar day the session actually had activity. A session that starts late at night and runs into the next day gets all its credit dumped on the start day — the following day, where most of the actual work happened, shows blank.

Steps to Reproduce

Evidence:

  • Session: "Web app audit for delivery flow" (claude/web-app-audit-delivery-2eedc1, PR #231, merged)
  • createdAt: 2026-07-28T01:24:11.107Z UTC → 2026-07-27, 10:24 PM Atlantic (UTC-3)
  • lastActivityAt: 2026-07-29T02:24:10.625Z UTC → 2026-07-28, 11:24 PM Atlantic

The session was created the night of the 27th and stayed active for ~25 hours, covering essentially all of the 28th. The heatmap shows July 28 as empty, and the streak counter breaks there instead of extending through it.

Suspected root cause:

  1. Day attribution likely keys off session createdAt rather than activity timestamps across the session's full lifetime.
  2. Bucketing appears to use UTC calendar dates rather than the user's local timezone, which can shift a late-night local session into the wrong UTC day.

Expected behavior:
A day counts as active if the session had any activity on it, with day boundaries computed in the user's local timezone rather than UTC.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Version: 2.1.209 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗