Skip to content

Token Optimization Guide

Practical guide to reducing GitHub Copilot token spend while keeping answers and code useful.

Start with Part 1 Jump to Practical Setup

What This Covers

  • Why token usage actually costs money under Usage-Based Billing
  • Why output control usually beats prompt compression on raw ROI
  • How to shrink always-on context, history, and tool overhead
  • How model-specific prompt guides improve first-pass quality and reduce rework
  • When Ask Mode, Edit Mode, and Agent Mode make financial sense
  • How to set enterprise guardrails without relying on unsupported controls
  • How to turn this repo into repeatable team habits

Fastest Wins

  1. Constrain output by default: Code only, no explanation. and No explanations unless asked.
  2. Keep .github/copilot-instructions.md small and specific.
  3. Use Ask Mode for questions that do not need tools.
  4. Retune prompts and instructions against the official guide for your target model.
  5. Disable MCP servers you are not using.
  6. Audit long-running agent sessions and repeated back-and-forth.
  7. Install RTK — CLI proxy that filters git, test runners, grep, and 100+ other shell commands before output reaches the agent. One install, 60-90% savings on tool-call results in agent and coding-agent sessions.

Read by Topic

Foundations

Techniques

Implementation

Quick Terms

  • UBB: usage-based billing. Copilot Business and Enterprise spend is tracked through AI-credit usage rather than request counters.
  • AI credits: the pooled billing unit used after the cutover.
  • Auto mode: Copilot's default model selector. Good default lane when you do not need to pin a model.
  • Ask Mode: single-shot interaction. Lowest-overhead choice for simple questions.
  • Agent Mode: multi-step interaction. Higher leverage, higher cost.
  • Content Exclusion: admin control for keeping selected repo content out of Copilot context.

Notes

  • /chronicle (full, all subcommands) is Copilot CLI. /chronicle:tips is also available in VS Code.
  • Usage-Based Billing is labeled UBB in this repo.