Skip to content

Add caveman compression mode and context window usage indicator#14

Merged
akhilsinghcodes merged 2 commits into
mainfrom
feature/upgrades
Jun 29, 2026
Merged

Add caveman compression mode and context window usage indicator#14
akhilsinghcodes merged 2 commits into
mainfrom
feature/upgrades

Conversation

@akhilsinghcodes

Copy link
Copy Markdown
Owner

Summary

This change introduces two major UX features for agents_fleet:

1. Caveman Compression Mode

Users can now select output compression levels (lite, full, ultra, wenyan) before starting a session. The selected level is passed to the model via:

  • Claude: --append-system-prompt flag
  • Codex: -c developer_instructions config override

Compression is tracked per-session and analytics dashboard shows compression savings stats broken down by level.

2. Context Window Status Indicator

Live colored status chip in the top info bar showing Claude Code's context utilization:

  • Green: < 70% context used
  • Amber: 70–89% used
  • Red: ≥ 90% used (warning)

Extracts ctxPct from Claude's AF statusline pattern (ctx=IN/SIZE(PCT%)) and updates every 500ms via websocket event.

3. Codex Status Line Parsing Fix

Fixed parsing of codex output to handle status lines that omit the in token when input tokens are 0 (e.g., pure output-only phases). Now matches in and out independently, defaulting input to 0 if absent.

Changes

  • Backend: New caveman_level session column, compression stats endpoint, dual-tool caveman prompt injection
  • Frontend: Caveman level selector dropdown, context % colored indicator, event handling for context updates
  • Analytics: Caveman savings metrics and dashboard breakdown by compression level
  • Exports: Added missing re-exports from @agents_fleet/ai-coach-analytics package (classifyWorkType, createRequest, extractCodeBlocks)

@akhilsinghcodes akhilsinghcodes merged commit 61552ef into main Jun 29, 2026
1 check passed
@akhilsinghcodes akhilsinghcodes deleted the feature/upgrades branch June 29, 2026 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant