Stop wasting context on raw tool output
何時使用: You feel your agent "forget" after 30 minutes and burn $$ on re-reads.
前置條件
- Claude Code v1.0.33+ —
brew upgrade claude-codeornpm update -g @anthropic-ai/claude-code
步驟
-
Install/plugin marketplace add mksglu/context-mode
/plugin install context-mode@context-mode✓ 已複製→ Plugin registers hooks + 6 sandbox tools -
Verify/context-mode:ctx-doctor✓ 已複製→ All checks [x]
-
Use normallyNow do a big task that would normally blow context — e.g. analyze all .log files under /var/log✓ 已複製→ ctx_execute used instead of raw Read; output indexed not dumped
-
Check savings/context-mode:ctx-stats✓ 已複製→ Per-tool reduction ratio reported
結果: Same task, 10x longer before compaction, and the agent remembers.
注意事項
- Other MCPs bypass the routing — Pass their tool calls through ctx_batch_execute for consistent accounting