How to Disable Claude Code's 1M Context Window to Reduce Token Usage

Claude Code users can disable the 1M context window feature that may be increasing token usage beyond expectations. According to a Reddit discussion, Anthropic's recent usage limit tightening has led to faster quota consumption, with the company pointing to the 1M context window as a contributing factor.
Configuration Options
The source provides two methods to control context window behavior:
Option 1: Disable 1M Context Completely
Add this to your ~/.claude/settings.json file:
{
"env": {
"CLAUDE_CODE_DISABLE_1M_CONTEXT": "1"
}
}This removes the 1M model variants from the model picker entirely. The configuration is officially documented in Claude Code docs under "Model configuration → Extended context."
Option 2: Cap Your Context Window
For more flexibility, you can cap the auto-compact window instead:
{
"env": {
"CLAUDE_CODE_AUTO_COMPACT_WINDOW": "200000"
}
}Anthropic recommends this approach in their recent investigation post. The example value of 200,000 tokens provides a specific cap while maintaining some extended context capability.
The Reddit post notes that these are temporary solutions and expresses skepticism about whether the 1M context window is the complete explanation for increased token usage. Users experiencing unexpected quota consumption may want to test these configurations to see if they make a difference in their specific workflows.
📖 Read the full source: r/ClaudeAI
👀 See Also

Five Common OpenClaw Setup Mistakes That Waste Money and Create Security Risks
Based on reviewing 50+ OpenClaw setups, the same five issues appear repeatedly: using Opus as the default model instead of Sonnet for most tasks, never starting fresh sessions, installing skills without reading source code, exposing the gateway to the network, and adding a second agent before fixing the first.

How a /loop Command Burned $6,000 in Claude API Overnight
A developer's unattended /loop command running every 30 minutes on claude-opus-4-7 consumed $6,000 in one night due to prompt caching expiration and growing context — a cautionary tale for AI agent automation.

Get Emoji-Decorated Checklists in Claude by Adding One Line to CLAUDE.md
Add a one-line marker set to your user-level CLAUDE.md to make Claude decorate checklists with status emojis — 14 fixed icons for done, running, failed, blocked, etc.

High CPU/RAM and Gateway Restarts in OpenClaw? Disable IPv6 for Telegram
Setting autoSelectFamily: false and dnsResultOrder: 'ipv4first' in Telegram bot config stops ENETUNREACH errors, fixing high CPU, event loop freezes, and gateway restarts.