Reduce agent context-window tokens
Context windows fill from more than chat history. Always-on instruction files, tool schemas,
MCP output, and long sessions all compete. The cheapest wins are usually the ones you pay
every turn — starting with AGENTS.md, CLAUDE.md, and Cursor rules.
1. Measure the always-on tax
Drop the instruction set into Clogmeter or use the AGENTS.md counter / Cursor rules counter. Note total tokens versus a 32k / 128k / 200k window before you rewrite prose.
2. Stop loading what the task does not need
- Switch Cursor rules from
alwaysApply: trueto globs or description triggers. - Move long procedures into skills or docs the agent opens on demand.
- Keep one canonical rule file; delete or @-import duplicates (imports still cost tokens when loaded).
3. Clean the session, not only the files
- Between unrelated tasks, prefer a clear/new session over endlessly compacting a huge thread.
- Filter noisy tool/MCP output; return summaries instead of raw logs.
- Match model size to the job — smaller models for mechanical subagents.
4. Fix conflicts before micro-edits
Conflicting always/never lines teach the model to hedge and still spend tokens twice. Clogmeter flags duplicates and possible conflicts so you can keep one source of truth first — see also cut conflicting rules first.
Open Clogmeter and weigh your instruction files → Free, browser-only. Token counts, duplicates, conflicts, trimmed export — nothing uploaded.