Token Optimization Guide
Spend fewer tokens on unnecessary context, narration, and rework. Keep the information needed to complete and verify the task.
Community guidance, not official GitHub or Microsoft policy.
Find the source of waste
| Mechanism | Read here |
|---|---|
| Response length and format | Output Control |
| Request clarity and shorthand | Prompt Compression and Language Comparison |
| Loaded context, instruction scope, file conversion, cache/handoffs | Context Management |
| Relevance of always-on instructions | Always-On Context Problem |
| Tool definitions, command output, and codebase maps | MCP & Tool Costs |
| Modes and workflow-specific habits | Workflow Optimization |
| Planning, acceptance checks, and rework | Outcome per Token |
| Model rates, routing, and effort | Model Selection & Pricing |
| Organization budgets and access | Enterprise Governance |
| Evidence and comparisons | Comparisons & Data |
Start concise; test stronger style rules
Ordinary concise language is the default. Caveman remains an option, but shorter narration does not guarantee a cheaper agent task. Read the scoped evidence and three-arm comparison before adopting it for cost savings.
Terms and reference links
Quick terms
- Input: prompts plus loaded instructions, files, history, and tool definitions.
- Output: generated tokens; visible prose is only part of an agent's work.
- Cached input: eligible reused context, billed under the applicable cache rate.
- UBB: usage-based billing. Check current plan terms and AI-credit rules.
- Mode: the workflow surface, such as Ask, Edit, or Agent; separate from model choice.
- Format tax: layout or extraction noise that can add input without helping the task.
Reference links
Measurements need a baseline, workload, model, and unit. Token reductions from different mechanisms are not additive; see Comparisons & Data.