What problem does it solve?
Context budgeting prevents agents from loading too many instructions and tool descriptions, which causes degraded reasoning, repetition, and inconsistent outputs when the prompt becomes too large.
Core Features & Use Cases
- Skill preloading limits: Enforces maximum numbers of preloaded skills and a maximum total line count of preloaded skill content per agent to keep prompts focused.
- Per-agent tier budgets: Applies different context thresholds for Haiku, Sonnet, and Opus so smaller models stay efficient while larger models get more capacity.
- Bloat detection and optimization loop: Uses measurable signals (like repetition, ignored instructions, and longer runtimes) and logs outcomes to claude-mem for periodic optimizer review.
- MCP overhead accounting: Incorporates baseline token usage from MCP tool descriptions into the budget so the skill limits reflect real runtime context pressure.
Quick Start
Use context-budget when configuring or spawning an agent by counting preloaded skills and summing their SKILL.md line counts, then trimming to stay under the recommended line limits for that agent tier.