How They Use AI  |  Newest

<< all plays  |  Tech

43% cost reduction per request

AreaTech
AI usedClaude Code
Sourcer/mcp
Posted2026-11-03

The move

Reduce the auto-compaction window setting to force more frequent context management.

Steps

  1. Install the tokendoctor plugin to analyze your current session history.
  2. Run the plugin to simulate different window sizes between 200K and 600K.
  3. Identify the optimal window size that balances cost and performance for your workflow.
  4. 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.

Sources



Last updated November 26, 2026.