Production-grade session context window tokenizer and compaction manager. Protects system prompt anchor tokens while applying FIFO rolling trim to intermediate dialogue.
Single tool with significant definition gaps. Tool name 'compact_session_window' lacks action verb prefix (should be 'compact_*' or similar). Description is present (54 chars) but minimal and lacks WHEN/WHY context. Input schema visible but incomplete: 'messages' param lacks type specification in the schema object itself (only in description), and 'max_token_budget' has a default but no min/max bounds documented. Output schema is completely undocumented, LLMs cannot predict return structure. No error handling guidance. Tool does not follow pattern:tool-description or pattern:constrained-input standards.
Compacts agent conversation history within token budget.
Input schema lacks proper type definitions. 'messages' parameter has no 'type' field in schema object; only description mentions 'array'. 'max_token_budget' has default but no minimum/maximum bounds.
Output schema completely undocumented. Tool returns a dict with 8 fields (compaction_id, max_token_budget, total_estimated_tokens, etc.) but no schema definition provided to LLM. LLMs cannot plan downstream calls or extract fields reliably.
Tool description is minimal (54 chars, below baseline 194 chars). Lacks WHEN to use, prerequisites, or relationship to other tools. Does not explain that system messages are preserved while dialogue is trimmed. State WHAT the tool does, WHEN to use it, and any prerequisites.'
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 37 | 2026-07-28+ | v2 |
No error handling or recovery guidance. Tool silently uses default messages if none provided; no validation of message structure (missing 'role' or 'content' keys). No guidance on what to do if token budget is too small.
Token estimation is naive (word count * 1.3). No documentation of estimation accuracy or limitations. LLMs may rely on this for critical budget decisions and get wrong results. Should document that this is approximate and may differ from actual tokenizer.