How VS Code Copilot Chat Compacts Your Conversation 0 ▲ alexop.dev 152 days ago · 8 min read1675 words · Tech · hide · Fediverse post LLMs have limited context windows. When an agent session grows too long, VS Code Copilot Chat uses compaction to summarize older history while keeping recent work verbatim. I traced exactly how it works from the source. The standalone `microsoft/vscode-copilot-chat` repo was **archived in May 2026**. The agent code now lives in the main [microsoft/vscode](https://github.com/microsoft/vscode) repo under `extensions/copilot/`, and it has changed since the standalone repo froze. Everything below is traced against the current `extensions/copilot` source. Source files (all under extensions/copilot/): src/extension/intents/node/agentIntent.ts — budget math, trigger logic src/extension/prompts/node/agent/summarizedConversationHistory.tsx — prompt, LLM call, history selection, re-insertion src/extension/prompts/node/agent/backgroundSummarizer.ts — the async state machine and thresholds src/extension/prompts/node/agent/simpleSummarizedHistoryPrompt.tsx — the Simple-mode fallback Microsoft… Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town