{"version":"2.1.300","anchor":"modelsettingsautocompactwindow-is-now-reported-as-a-setting","canonical_anchor":"modelsettingsautocompactwindow-is-now-reported-as-a-setting","heading":"Claude Code tracks where the auto-compact window comes from, including per-model settings","tier":"use","area":"Compaction","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.300\/e\/modelsettingsautocompactwindow-is-now-reported-as-a-setting","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.300","markdown":"### Claude Code tracks where the auto-compact window comes from, including per-model settings\n\nThe auto-compact window can be set per model under `modelSettings`, and Claude Code now records which source decided the window in use\n\n**What**\n\nCompaction is when Claude Code shortens the conversation so it fits in the model's working memory (the context window). The `autoCompactWindow` setting controls how full that memory gets before this happens.\n\n- A per-model value is looked up at `modelSettings.autoCompactWindow`, so different models can have different windows.\n\n- Claude Code now records the window actually in force and where it came from, once each time it changes. Possible sources are `env`, `server`, `experiment`, `default`, `agent_definition`, `session_override`, `settings_per_model` and `settings_top_level`. The code that works out the window was split up to allow this.\n\n- Records of successful compaction gain `autoCompactWindow`, `autoCompactWindowOrigin` and `armTrigger` fields.\n\n- A new helper can prepare a compaction in advance while Claude Code is idle (`armTrigger` `\"idle\"`).\n\n- The list of settings Claude Code reports as set now includes `modelSettings.autoCompactWindow` when any entry under `modelSettings` defines `autoCompactWindow`, alongside `permissions.defaultMode` and `worktree.baseRef`.\n\n**Why**\n\nSeveral places can set the auto-compact window, from environment variables to settings files to agent definitions. Recording which one won makes it possible to tell why compaction happens when it does, and confirms a per-model setting is recognised.\n\n- Area: Compaction\n- Names: `modelSettings.autoCompactWindow`\n- Tier: Use it now\n- Useful: 3\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}