codexmate
codexmate copied to clipboard
feat(analytics): model context window utilization warning
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
- Open session list page → check the context % column
- Trigger a large file operation to push a session toward the limit
- Verify red flag appears at 80%+ and warning appears at 95%+
- Verify the warning is dismissible and the session remains usable
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.
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