GitHub Cuts Copilot's AI Costs by Trimming Its Own Prompts
Software / news
GitHub Cuts Copilot's AI Costs by Trimming Its Own Prompts
Four September changes save as little as 2.3% and as much as 5.5% per technique, well under the token cuts Visual Studio Code's team reported in June.
GitHub cut the cost of running Copilot's coding agents with four changes to its own prompts, according to a Sept. 2 post from the Copilot engineering team, the second such effort in 2026 after Visual Studio Code's editor team published a separate round of token cuts on June 17.
The task the Copilot team gave itself was narrow: find places where the agent was sending the model information it did not need, without changing what the agent could do. Staff Software Engineer Erik Kristensen and Software Engineer Napalys Klicius, both at GitHub, wrote up four specific changes and measured each one against production traffic.
What actually got smaller
The biggest single change, according to the post, was compacting the output Copilot's code review feature shows the model: a 5.5% cost reduction with "no material regression" in the review-quality metrics GitHub tracks. Stripping line-number prefixes from the tool that lets the agent view a file, leftover formatting from an older edit workflow, cut model-inference cost by roughly 5% in offline testing and by about 3% in a live experiment measuring daily cost per user on the Copilot CLI.
A third change compacted the prompt Copilot sends every time it hands work to a background task, trimming about 1,300 tokens per turn, which the post says worked out to 1.8% fewer total prompt tokens per session and a 2.9% drop in normalized cost per active hour. A fourth batched the notifications Copilot sends when a long-running background command finishes, instead of checking in after each one, for a 2.3% reduction in the AI Credits GitHub uses to meter usage.
| Change | Measured cost cut |
|---|---|
| Selective output compaction (code review) | 5.5% |
| Remove line-number prefixes | 3.1% |
| Compact task-tool prompt | 2.9% |
| Reduce notification roundtrips | 2.3% |
- Selective output compaction5.5 %
- Remove line-number prefixes3.1 %
- Compact task-tool prompt2.9 %
- Reduce notification roundtrips2.3 %
Source: GitHub Blog, "How we make AI coding more cost efficient without sacrificing task quality," accessed 2026-09-13
A bigger cut came from VS Code in June
None of the September changes approaches what the Visual Studio Code team reported three months earlier. Engineers Ryan Caldwell and Bhavya U described deferring tool definitions so Copilot loads them on demand instead of upfront, plus longer-lived prompt caching and persistent WebSocket connections for sequential requests. For Anthropic models, that combination cut total tokens per session by 18.03% for median users; for OpenAI's GPT-5.5, session-wide token use fell 10.92%.
Why the two efforts don't add up cleanly
The June and September changes attack different layers of the same product: VS Code's fixes touch how Copilot talks to the model over the wire, while the Copilot engineering team's September changes touch what the agent puts in the prompt itself. GitHub has not published a combined number for a single session running both sets of changes, and the September post does not say what baseline cost per session it was measuring from before any of the four changes shipped.
That gap matters most for the scheduled agent runs VS Code 1.137 added in September, which fire Copilot hourly, daily or weekly without a person watching the token count, and for the background coding agents Cognition raised $2 billion partly to build. A user running background agents dozens of times a day is exactly the case both posts describe optimizing for, and exactly the case where neither team has published what a full session costs today. Kristensen and Klicius said the four September changes were validated through "offline benchmarks and live experiments," but did not publish a baseline per-session cost to measure the percentage cuts against, or say whether further prompt changes are planned.
Sources
More in Software
- 01ZCode Uploads Users' Full Git History, Zhipu Says It Deletes ItA developer's reverse-engineering forced a same-day apology from Zhipu over a coding assistant that never told users it was packaging their repositories for the cloud.
- 02Alibaba's Open Code Review Tool Ships an IntelliJ PluginVersion 1.12.6 extends the AI code reviewer to JetBrains IDEs the same week Alibaba's own benchmark shows it trading recall for precision against Claude Code.
- 03Flet Reaches 1.0, Ships One Python App to Six PlatformsFeodor Fitsner's framework rebuilt its bridge to Flutter for the stable release, but has not said how many people pay for anything built on top of it.
- 04Bend 2 Bets Formal Proof Can Catch AI's Coding MistakesVictor Taelin's rewritten language backs its safety pitch with a compiler its own README calls 99 percent AI-written and not yet audited.