Improving token efficiency for GitHub Copilot in VS Code

AI-generated summary of reporting by VS Code Blog. Read the original for the full story.

Why it matters

GitHub Copilot users get cheaper, faster agent sessions in VS Code as token costs drop 9-18% via better prompt caching and on-demand tool loading.

Read this as

GitHub made the AI coding helper in VS Code cheaper and faster to use. When you pause a session, the AI's memory of your project now lasts up to 24 hours instead of expiring in minutes, so resuming costs less. It also stops sending every possible tool description to the AI each turn, loading only what's needed. Median users saw roughly 9-18% lower token usage, which cuts their billed credits.

With Copilot now on usage-based billing, GitHub cut per-task inference costs in VS Code by extending OpenAI prompt-cache retention to 24 hours, deferring tool definitions (about 18% token savings on Anthropic models), and making WebSockets the default transport for GPT-5.2+. Anthropic cache hit rates now sit around 94%. Costs fall for users; competitors face pressure to match harness-level efficiency. No pricing changes announced.

GitHub optimized Copilot's agentic harness via three mechanisms: prompt_cache_retention 24h for OpenAI models (cache hit rate up 919% relative after long gaps), OpenAI native tool search via defer_loading (GPT-5.4/5.5 median session tokens down 8.97%/10.92%), and Responses API WebSocket mode reducing latency. For Anthropic, four deliberate cache_control breakpoints (94% hit rate) and client-side embedding-guided tool search cut prompt tokens roughly 18%. Deferred tools sit outside the cached prefix, preserving cache reuse.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

GitHub Copilot VS Code OpenAI Anthropic GPT-5.4 GPT-5.5 GPT-5.3-Codex

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading