Bug Fixes
Root cause
Some users' ~/.claude/stats-cache.json files are missing modelUsage, dailyActivity, or hourCounts fields — common on fresh Claude Code installs, Windows machines, or when the cache hasn't fully populated yet. This caused the API routes to crash mid-execution, surfacing as:
Cannot read properties of undefined (reading 'totalInputTokens')
Fixes
/api/stats— guardstats.modelUsage ?? {}andstats.dailyActivity ?? []/api/costs— guardstats.modelUsage ?? {}/api/activity— guardstats.dailyActivity ?? []andstats.hourCounts ?? {}overview-client— added!data.computedcheck before destructuring so the loading skeleton shows instead of crashing if the API response is incomplete