From 892837d352de882bbfa25f31cda438c606edaaa3 Mon Sep 17 00:00:00 2001 From: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Date: Thu, 30 Jul 2026 12:02:02 -0700 Subject: [PATCH] Enable Auto Compact by default in VS Code (#12739) * feat(vscode): enable Auto Compact by default The SDK-based extension has no fallback context management: with auto compact off, hitting the model's context window fails the request with a provider error and retrying keeps failing (the legacy extension truncated the oldest half of the conversation in this situation). The CLI already defaults compaction on (agentic); align the extension with it. * chore: add changeset for Auto Compact default-on --- .changeset/proud-crabs-compact.md | 5 +++++ apps/vscode/src/sdk/cline-session-factory.ts | 4 +++- apps/vscode/src/shared/storage/state-keys.ts | 2 +- apps/vscode/webview-ui/src/context/ExtensionStateContext.tsx | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 .changeset/proud-crabs-compact.md diff --git a/.changeset/proud-crabs-compact.md b/.changeset/proud-crabs-compact.md new file mode 100644 index 0000000000..c7f614dd54 --- /dev/null +++ b/.changeset/proud-crabs-compact.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Enable Auto Compact by default so long chats automatically compress conversation history instead of failing at the model context limit. It can be disabled in Settings → Features → "Auto Compact". diff --git a/apps/vscode/src/sdk/cline-session-factory.ts b/apps/vscode/src/sdk/cline-session-factory.ts index d3396907b4..36d22fef40 100644 --- a/apps/vscode/src/sdk/cline-session-factory.ts +++ b/apps/vscode/src/sdk/cline-session-factory.ts @@ -904,7 +904,9 @@ export async function buildSessionConfig(input: SessionConfigInput): Promise