Repro
./operator usage-import --harness claude --since 2026-07-17T00:00:00 --dry-run
File ".../operator", line 2806, in usage_import_cmd
if since_dt <= s["start_time"] <= until_dt:
TypeError: can't compare offset-naive and offset-aware datetimes
Session start_time values parsed from harness logs are timezone-aware; a --since/--until given without an offset parses naive and the comparison raises before any filtering happens.
Workaround
Pass an explicit offset: --since 2026-07-17T00:00:00-07:00 works.
Suggested fix
Normalize user-supplied boundaries after parsing: if tzinfo is None, assume the local timezone (.astimezone()), matching how a user reads their own clock. One-liner at the parse site feeding line 2806.
Found 2026-07-17 while re-feeding the usage ledger from Claude session logs (first import after the ledger went stale 2026-07-02).
🤖 Generated with Claude Code
Repro
Session
start_timevalues parsed from harness logs are timezone-aware; a--since/--untilgiven without an offset parses naive and the comparison raises before any filtering happens.Workaround
Pass an explicit offset:
--since 2026-07-17T00:00:00-07:00works.Suggested fix
Normalize user-supplied boundaries after parsing: if
tzinfo is None, assume the local timezone (.astimezone()), matching how a user reads their own clock. One-liner at the parse site feeding line 2806.Found 2026-07-17 while re-feeding the usage ledger from Claude session logs (first import after the ledger went stale 2026-07-02).
🤖 Generated with Claude Code