{"name":"autoCompactWindow","slug":"autocompactwindow","family":"setting","title":"Settings keys","noun":"settings key","description":"Set how full the context gets before Claude Code [compacts](\/docs\/en\/context-window)","description_source":"docs","described_by":{"doc":"claude-code\/settings-reference","title":"All settings"},"presence":{"first_seen":"2.1.138","removed_in":"2.1.284","in_current_build":false,"newest_mined":"2.1.308","builds":126,"mined_builds":149,"first_cited":{"version":"2.1.288","released_at":"2026-10-02 18:30:40","spans":3}},"aliases":[],"entries":[{"version":"2.1.307","anchor":"auto-compact-window-persisted-per-model-via-internal-metadat","heading":"Auto-compact window is remembered per model when a session is resumed","line":"Each model's auto-compact window is now saved with the session and restored on resume, and the default window for a model has changed","released_at":"2026-10-21 20:47:18","reason":"named in this entry, found in this entry's text"},{"version":"2.1.301","anchor":"managed-settings-schema-expanded-settings-read-tool-returns","heading":"Organizations can push more settings remotely, and the output style is now reported","line":"Remotely managed settings now accept keys such as `effortLevel`, `outputStyle` and `attribution`, and Claude Code's settings report includes the output style","released_at":"2026-10-15 14:34:23","reason":"found in this entry's text"},{"version":"2.1.300","anchor":"telemetry-for-the-auto-compact-window-in-force","heading":"Claude Code now reports which setting decides when it compacts","line":"A new usage report records the auto-compact window in force and where it came from, such as an environment variable, a setting or the default","released_at":"2026-10-14 14:27:26","reason":"found in this entry's text, named in this entry"},{"version":"2.1.300","anchor":"modelsettingsautocompactwindow-is-now-reported-as-a-setting","heading":"Claude Code now notes when a per-model auto-compact window is set","line":"Claude Code's list of settings in use now includes `autoCompactWindow` when it is set for any model under `modelSettings`","released_at":"2026-10-14 14:27:26","reason":"found in this entry's text"},{"version":"2.1.296","anchor":"plugin-agent-frontmatter-gains-autocompactwindow-passed-thr","heading":"Plugin agents can set their own auto-compact window","line":"Plugin agent files can now set `autoCompactWindow` to choose when that agent compacts its own conversation as a subagent","released_at":"2026-10-09 16:58:10","reason":"found in this entry's text, named in this entry"},{"version":"2.1.296","anchor":"agent-definitions-can-carry-an-autocompactwindow-passed-to","heading":"Subagent definitions now pass their own auto-compact window to the agent","line":"An agent definition can set `autoCompactWindow`, and Claude Code now passes that value on to the subagent it starts","released_at":"2026-10-09 16:58:10","reason":"found in this entry's text"},{"version":"2.1.296","anchor":"agent-auto-compact-threshold-now-takes-a-second-window-sourc","heading":"Teammate agents weigh a second setting when deciding to compact","line":"Teammate agents now check a per-agent compaction window alongside autoCompactWindow when deciding whether to compact their history","released_at":"2026-10-09 16:58:10","reason":"found in this entry's text"},{"version":"2.1.288","anchor":"per-model-autocompactwindow-setting","heading":"Auto-compact window can now be set separately for each model","line":"`autoCompactWindow` can now go under `modelSettings` for a single model, as a token count or `auto`","released_at":"2026-10-02 18:30:40","reason":"found in this entry's text, named in this entry"},{"version":"2.1.288","anchor":"auto-compact-window-is-now-per-model","heading":"The auto-compact window is now saved separately for each model","line":"Setting the auto-compact window in `\/config` now applies to the current model only, not every model","released_at":"2026-10-02 18:30:40","reason":"found in this entry's text, named in this entry"},{"version":"2.1.261","anchor":"new-settings-keys-bashoutputmaxchars-taskoutputmaxchars","heading":"New settings keys: bashOutputMaxChars \/ taskOutputMaxChars","line":"The new Bash and Task output limit settings are now formally recognized and propagated internally.","released_at":"2026-09-04 17:49:34","reason":"found in this entry's text"}],"entries_total":15,"docs":[{"source":"claude-code","path":"settings-reference","title":"All settings","documented":true},{"source":"claude-code","path":"settings","title":"Claude Code settings","documented":true},{"source":"claude-code","path":"agent-sdk\/subagents","title":"Subagents in the SDK","documented":false},{"source":"claude-code","path":"agent-sdk\/typescript","title":"Agent SDK reference - TypeScript","documented":false},{"source":"claude-code","path":"agent-teams","title":"Orchestrate teams of Claude Code sessions","documented":false},{"source":"claude-code","path":"changelog","title":"Claude Code changelog","documented":false},{"source":"claude-code","path":"claude-directory","title":"Explore the .claude directory","documented":false},{"source":"claude-code","path":"env-vars","title":"Environment variables","documented":false},{"source":"claude-code","path":"managed-settings","title":"Deploy managed settings","documented":false},{"source":"claude-code","path":"model-config","title":"Model configuration","documented":false}],"docs_total":12,"gates":[],"related":[],"url":"https:\/\/changelogs.core-directive.com\/reference\/setting\/autocompactwindow","family_url":"https:\/\/changelogs.core-directive.com\/reference\/setting.json"}