<< all plays | Tech
43% cost reduction per request
| Area | Tech |
| AI used | Claude Code |
| Source | r/mcp |
| Posted | 2026-11-03 |
The move
Reduce the auto-compaction window setting to force more frequent context management.Steps
- Install the tokendoctor plugin to analyze your current session history.
- Run the plugin to simulate different window sizes between 200K and 600K.
- Identify the optimal window size that balances cost and performance for your workflow.
- Update the autoCompactWindow setting in your Claude Code configuration to the identified value.
Prompt for your AI
Analyze my current Claude Code session history and suggest an optimal 'autoCompactWindow' setting to minimize token usage without sacrificing task performance.
What happened
The user noticed that Claude Code was waiting until 967K tokens to compact context, making long sessions expensive. By lowering the autoCompactWindow to 400,000, they reduced the average context per request from 415K to 220K. This change resulted in a 43% reduction in cost per request.Watch out
Setting the window too low may trigger excessive summarization, which can increase latency and cause the model to lose track of previous file reads.Give it to your agent
Read https://howtheyuse.ai/p/43-cost-reduction-per-request.md and help me run this play.