Skills
Force 1M-context Claude models back to a 200K window with CLAUDE_CODE_DISABLE_1M_CONTEXT
Claude Code 2.1.223 (Aug 6) extended `CLAUDE_CODE_DISABLE_1M_CONTEXT` to hold all 1M-window Claude models to 200K by triggering auto-compaction at the smaller boundary, and fixed auto-compaction failing to hold unrecognized model IDs inside their assumed context window. `CLAUDE_CODE_DISABLE_UNKNOWN_MODEL_WINDOW_ENFORCEMENT=1` restores the previous behavior if the new enforcement is too aggressive for a custom gateway model. This is a direct cost and quality lever — a long, uncompacted context is both expensive and subject to attention degradation, and this makes forcing compaction a one-variable decision rather than a prompting discipline.
↳ Follow the thread