codexmate icon indicating copy to clipboard operation
codexmate copied to clipboard

feat(analytics): model context window utilization warning

Open SurviveM opened this issue 6 months ago • 2 comments

Requirements

Track token consumption ratio per session per model. Sessions exceeding 80% utilization should be marked red. Sessions exceeding 95% should trigger a warning. Predict out-of-context risk before it happens.

Verification

  1. Open session list page → check the context % column
  2. Trigger a large file operation to push a session toward the limit
  3. Verify red flag appears at 80%+ and warning appears at 95%+
  4. Verify the warning is dismissible and the session remains usable

SurviveM avatar May 06 '26 14:05 SurviveM

This feature request has been reviewed and prioritized.

Assessment:

  • High value for user experience - prevents context window exhaustion surprises
  • Implementation complexity: Medium - requires session token tracking and UI indicators
  • Dependencies: Session management infrastructure (already in place)

Proposed approach:

  • Track token consumption per session
  • Add visual indicators (80% = red, 95% = warning)
  • Implement dismissible warning system

Will be considered for next sprint planning.

ymkiux avatar May 17 '26 18:05 ymkiux

Implemented in PR #166. Features added:

  • Token utilization percentage calculation per session
  • Visual indicators with color coding (green/orange/red)
  • Pulse animation for warning (80%+) and critical (95%+) states
  • Percentage badge displayed in session list header

ymkiux avatar May 17 '26 18:05 ymkiux