Skip to content

5 hours sessions tracker #23

Description

@ryoppippi

Discussed in #20

Originally posted by IntegralMedia01 June 7, 2025
please add ability to keep track of those 5 hours sessions. how many sessions already used for the month.

Activity

  1. a-c-m commented on Jun 16, 2025

    @a-c-m
    Contributor

    I'm interested in this.

    Would like to be able to see:

    • Session start/end
    • tokens used, by model.
    • % of allocation used (if it can tell the tier you are on, or is provided by cli)

    If a session is active, it should also predict, total session usage (i.e. will you hit the limit) for that session, by simple extrapolation is fine.

  2. ryoppippi commented on Jun 16, 2025

    @ryoppippi
    MemberAuthor

    Thank you everyone.
    Actually this feature is once closed by #55 , so I need to figure out which one is better.
    I'll review both of them and decide one of your works.
    Thank you for your contributions! Happy vibe coding!

  3. Kaniikura commented on Jun 16, 2025

    @Kaniikura

    Hi @ryoppippi and @a-c-m,

    My apologies for the duplicate PR. After reviewing the technical specifications more carefully, I realize that PR #80's approach with dynamic 5-hour windows starting from first message is the correct implementation of Claude's session tracking.

    My PR #84 incorrectly uses fixed UTC time windows, which doesn't match how Claude actually counts sessions. @a-c-m's implementation properly follows the rolling 5-hour window specification.

    I'll close my PR since #80 has the correct approach. Great work @a-c-m!

    Thanks for your patience with the confusion.

  4. ryoppippi commented on Jun 16, 2025

    @ryoppippi
    MemberAuthor

    Thank you for analysing! I haven't checked it yet tho

    Thank you for taking time to work on it

  5. Kaniikura commented on Jun 16, 2025

    @Kaniikura

    📋 Technical Reference: Claude Session Tracking Specification

    For anyone implementing session tracking, here are the key technical points from my research:

    Session Definition:

    • Sessions are 5-hour rolling windows starting from first message (NOT fixed time slots like 00:00-05:00)
    • Cross-platform: sessions span ALL Claude interfaces (web, mobile, Claude Code) with shared quota
    • Example: Message at 09:00 starts session until 14:00; next message at 14:01 starts new session

    Critical Implementation Challenges:

    • Claude Code alone provides incomplete data - can't track web/mobile usage
    • Monthly reset period unclear: calendar month vs billing cycle (needs Anthropic clarification)
    • Max plan: 50 sessions/month limit (flexible guideline, ~250 hours potential)

    Accurate Implementation Requirements:

    • Monitor ALL Claude platforms (currently impossible with local data only)
    • Track exact timestamps of first message in each 5-hour window
    • Handle cross-conversation sessions within same window

    Note: This is my interpretation of available docs - could be wrong! For accurate specs, you'd need to contact Anthropic support directly.

    Any CLI implementation should clearly state limitations and encourage users to verify actual usage via claude.ai/settings.

  6. rockmandash commented on Jun 17, 2025

    @rockmandash

    vibemeter.ai seems has this feature, but I don't know it's implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions