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

Agent Skills: Stop Writing SOPs, Start Building Boundary Systems
A Reddit post argues that adding more skills or tools to an AI agent makes it more fragile. The solution: minimum complete toolset, maximum boundary clarity.

10 Practical Tips for Using Claude Code from Reddit User
A Reddit user shares specific techniques for Claude Code including using /effort high with 'ultrathink' for extended thinking, creating isolated conversation branches with /fork, and setting up custom hooks in .claude/settings.json.

Claude Code token audit reveals hidden costs from default tool loading
A developer analyzed 926 Claude Code sessions and found 45,000 tokens loaded at session start, with 20,000 tokens coming from system tool schema definitions. Enabling the ENABLE_TOOL_SEARCH setting reduced starting context from 45k to 20k tokens, saving 14,000 tokens per turn.

Running OpenClaw Inside Ollama's Docker Container for Simpler Networking
A Reddit user shows how to install OpenClaw inside the official ollama/ollama Docker container so OpenClaw talks to Ollama via localhost, avoiding host.docker.internal and extra networking setup. Trade-off is higher RAM usage.