A token is a unit used to measure language-model input and output. Request cost depends on both counts and their respective rates, so reducing the prompt alone can miss the more expensive source of waste: a verbose response. section 9.1.1 section 9.2.5
For example, at the cited early-2026 Claude Sonnet rates of $3 per million input tokens and $15 per million output tokens, a 4,000-token prompt costs $0.012 and a 2,000-token response costs $0.03. The shorter response costs more; check current rates rather than relying on these figures. section 9.1.1
Reduce token use where it does not improve the task:
- Choose the interaction mode to fit the work. A cited tab completion uses roughly 150 tokens, an inline edit 2,800, and a multi-file agent session 30,000 or more; the difference comes from context and output, not just the model. section 9.2.2
- Audit recurring instructions and load supporting files when relevant. One rules-file audit reduced its size from 8,200 to 2,800 tokens by consolidating instructions and moving specialized guidance elsewhere. section 9.2.3
- Limit unnecessary explanations and unchanged code in output. For direct calls without an edit mechanism, request changed sections with enough surrounding context for placement. section 9.2.5
When generating or modifying code, output only the code changes. Do not explain unless explicitly asked.
This instruction makes code changes the default output while leaving explanations available on request. section 9.2.5
Measure the cost–accuracy tradeoff
In a 316-query benchmark, supplying the last 10 queries cost 7 units; supplying 20 cost 10 units while simple-query p50 accuracy rose from about 0.64 to 0.71. More context can improve accuracy, but its incremental benefit should justify its cost at expected traffic levels. section 6.4.2







































