What problem does it solve? Tracking token consumption and prompt-cache efficiency across Grok Build sessions is manual and error-prone, making it hard to detect context bloat, cache misses, and rising API costs before they degrade performance. ## Core Features & Use Cases - Session Context Monitoring: Syncs totalTokens from Grok updates.jsonl logs into reports/tokens/ and warns when context exceeds 100k tokens or a single turn grows by 15k tokens. - Prompt-Cache Analysis: Parses xAI API usage JSON to compute cache hit rates and flags POOR status when cached_tokens is zero on substantial prompts. - Cost Estimation: Applies per-model pricing from references/pricing.json to estimate session and per-turn spend, including cache savings versus no-cache baselines. - Use Case: During a long coding session, the agent appends a one-line Token meter footer to each response showing context size, turn delta, and estimated cost, and warns you to summarize the thread when context approaches 128k tokens. ## Quick Start Ask the agent to run the token monitor sync and show the current session's token usage, cache status, and estimated cost.