The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Merge pull request #210 from Warshoow/docs/token-optimization-guide
Affaan Mustafadb52081438a5
diff --cc README.mdindex a145b3621,34c9f57c3..6d715505c--- a/README.md+++ b/README.md@@@ -940,20 -747,35 +940,40 @@@ The `strategic-compact` skill (include### Context Window Management-**Critical:** Don't enable all MCPs at once. Your 200k context window can shrink to 70k with too many tools enabled.+**Critical:** Don't enable all MCPs at once. Each MCP tool description consumes tokens from your 200k window, potentially reducing it to ~70k.-Rule of thumb:-- Have 20-30 MCPs configured-- Keep under 10 enabled per project-- Under 80 tools active+- Keep under 10 MCPs enabled per project+- Keep under 80 tools active+- Use `disabledMcpServers` in project config to disable unused ones-Use `disabledMcpServers` in project config to disable unused ones.+### Agent Teams Cost Warning++Agent Teams spawns multiple context windows. Each teammate consumes tokens independently. Only use for tasks where parallelism provides clear value (multi-module work, parallel reviews). For simple sequential tasks, subagents are more token-efficient.++---++## ⚠️ Important Notes+ ### Token Optimization++ Hitting daily limits? See the **[Token Optimization Guide](docs/token-optimization.md)** for recommended settings and workflow tips.++ Quick wins:++ ```json+ // ~/.claude/settings.json+ {+ "model": "sonnet",+ "env": {+ "MAX_THINKING_TOKENS": "10000",+ "CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "50",+ "CLAUDE_CODE_SUBAGENT_MODEL": "haiku"+ }+ }+ ```++ Use `/clear` between unrelated tasks, `/compact` at logical breakpoints, and `/cost` to monitor spending.+### CustomizationThese configs work for my workflow. You should: