Usage stats show token consumption during period when laptop was fully powered off
Resolved 💬 3 comments Opened Jun 7, 2026 by Anubh Closed Jul 13, 2026
Description
The /usage dialog in Claude Code shows token consumption attributed to a time window when my laptop was fully shut down (not sleep/hibernate — fully powered off).
Steps to Reproduce
- Use Claude Code for a session, then fully shut down the laptop (not sleep)
- Boot the laptop the next morning and open Claude Code
- Run
/usageand check the \"Last 24h\" stats
Observed Behavior
The usage stats show activity during the hours the laptop was off. Specifically:
- Laptop was shut down at approximately 1 AM
- The
/usagedialog shows usage characteristics (including >150k context sessions) attributed to time windows after shutdown - ~15% of 24h usage appears to have occurred while the machine was off
Expected Behavior
No token consumption should be possible on a fully powered-off machine. The stats should show zero usage after shutdown time.
Investigation Done
- Checked
CronList— no local cron jobs - Checked remote routines via
RemoteTrigger {action: "list"}— no scheduled remote agents - No other devices or claude.ai sessions active
- The
/usagedialog itself states: "Approximate, based on local sessions on this machine — does not include other devices or claude.ai"
Environment
- Platform: macOS (Darwin 25.2.0)
- Claude Code version: (latest as of 2026-06-07)
Notes
The stats say \"approximate\" but attributing usage to a powered-off machine suggests either a bug in the timestamp tracking logic or a background process waking/running unexpectedly. Worth investigating whether session log timestamps are written at consumption time vs. flush time (e.g., at shutdown).
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗