GithubErik KristensenExplainer
How we make AI coding more cost efficient without sacrificing task quality
Summary
GitHub Copilot’s AI coding efficiency work focuses on completed task cost rather than tokens in individual tool calls, because shorter responses can trigger recovery work. Using agentic coding benchmarks and controlled online experiments, the team evaluated selective output compression, removal of unused line-number prefixes, prompt shortening, and direct delivery of completed background results. The shipped compressor preserves source-like and arbitrary output, reorganizes search results without dropping content, and compresses repetitive install, build, test, and progress output while retaining a recovery path to originals. Removing line-number prefixes cut offline model-inference cost roughly 5% and online daily cost about 3%; direct background-result delivery reduced AI Credit usage about 2.3%, while prompt changes required workload-specific validation.
Context
The work addresses the mismatch between per-tool-call token counts and end-to-end efficiency. Shorter outputs or prompts can omit useful context, cause agents to rerun commands or retrieve results, add model turns, and increase total task cost or duration. The post also notes that an optimization can behave differently across Copilot workflows.
Approach / What changed
The team evaluated changes with agentic coding benchmarks, open source repositories, controlled online experiments, and workflow-specific quality metrics. Changes included selectively compressing repetitive command output, removing unused line-number prefixes, shortening prompts while testing behavioral requirements, and having the harness batch and directly deliver completed background-task results.
Takeaways
Selective compression preserves source-like and arbitrary output, retains all search results while reorganizing them, and compresses repetitive install, build, test, and progress output only when savings are substantial.
Removing line-number prefixes from file views reduced offline model-inference cost by roughly 5% and average daily online cost per user by about 3%, with no material quality regression detected.
The harness’s direct delivery of completed background results reduced average token-related usage, measured in AI Credits, by about 2.3% by eliminating retrieval-only model turns.
Source and freshness
- Source
- github.blog
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.