savetokens.tips
Token-saving techniques for AI coding agents
A characterized reference for saving tokens when working with Claude Code and Codex. Measured figures come from logged raw-versus-filtered token deltas. Estimated figures carry no counterfactual and are marked as such.
Characterization data: snapshot 2026-07-18, global scope, values subject to revision. Figures are a dated sample from rtk gain. No other numbers are invented.
- Token reduction across all proxied commands: [M]83.5% typ, n=92,695, snapshot 2026-07-18.
- Per-command token deltas logged by the RTK proxy, reported raw versus filtered.
- Measured and estimated figures held apart on six channels at once, readable in grayscale.
- One accent color, reserved to mean production tested and nothing else.
- Every figure states its source, date, scope, and sample count.
- Empty cells are a legal state. A figure with no measured value shows the not-characterized mark, never a guess.
| Parameter | Value | Unit |
|---|---|---|
| Context window, working budget | [S]~200,0001 S, vendor spec, no counterfactual | tokens |
| Single command output, before filtering | · | tokens |
| Sustained context occupancy | · | % |
- Vendor specification, not measured here, no counterfactual. A nominal ceiling for planning, never a characterized figure.
Note: stresses beyond these limits cause context to be dropped, not summarized. Sustained operation near maximum reduces answer quality.
Conditions unless otherwise noted: rtk gain, snapshot 2026-07-18, global scope, raw output tokens versus RTK-filtered output tokens. Min and Max are shown only where a distribution exists.
| Part No | Parameter | Min | Typ | Max | Unit | Test conditions |
|---|---|---|---|---|---|---|
| RTK-READ-01 | Tokens saved, rtk read | · | [M]24.91 | · | % | n=571, 8.9M saved |
| RTK-DIFF-01 | Tokens saved, rtk git diff | · | [M]99.21,3 | · | % | n=3, 5.6M saved, one large diff |
| RTK-LOG-01 | Tokens saved, rtk git log --all -p | · | [M]100.01,3 | · | % | n=1, 2.0M saved, single observation |
| RTK-GREP-01 | Tokens saved, rtk grep | · | [M]23.01 | · | % | n=1199, 448.6K saved |
| RTK-VITEST-01 | Tokens saved, rtk vitest run | · | [M]92.51 | · | % | n=38, 208.4K saved |
| RTK-PULL-01 | Tokens saved, rtk git pull | · | [M]92.31 | · | % | n=73, 38.9K saved |
| RTK-TERSE-01 | Prose reduction, terse prompting | · | [E]~752 | · | % | no counterfactual, design target only |
| STK-TOTAL | All proxied commands | · | [M]83.51 | · | % | n=92,695 commands, 18.4M saved |
- Production tested. Raw output token count versus RTK-filtered output token count, logged per command by rtk gain.
- Guaranteed by design, characterization only, not production tested.
- Single observation, not a distribution. Treat the value as one sample, not a stable average.
Saved percent plotted against command frequency, from the 2026-07-18 snapshot. Measured points carry the accent and a solid mark whose size grows with sample count. The estimate renders as a dashed reference line and never carries the accent.
5.1 RTK-DIFF-01, route git diff through the RTK proxy
Functional block diagram of one proxied command. Raw diff enters, RTK filters it, a compact diff summary leaves. The delta is the characterized parameter.
raw output → rtk git diff
filter → filtered
summary delta [M]99.2%1,2 saved
A full git diff of a large change can send millions of characters to the model, most of which the agent never reads line by line. Routing the command through RTK returns a filtered summary that preserves the decision content: which files changed, the shape of the change, and the parts that need review.
In one measured large diff the filtered output used 99.2 percent fewer tokens than the raw diff, a saving of 5.6 million tokens. The delta is pooled across three runs and treated as one sample, not a stable average, so read it as a strong signal rather than a guaranteed rate. Use rtk git diff whenever a diff is large enough that you would scroll past most of it anyway.
Handle estimates with care. Values marked [E] are design targets, not measured, and are not guaranteed across sessions.
- Production tested. Raw output token count versus RTK-filtered output token count, logged per command by rtk gain.
- Single observation, not a distribution. Treat the value as one sample, not a stable average.
One application note is characterized in full above. The remaining characterized parts follow the same note structure.
| Part No | Technique | Status |
|---|---|---|
| RTK-DIFF-01 | Route git diff through the RTK proxy | Active |
| RTK-READ-01 | Route file reads through the RTK proxy | Active |
| RTK-TERSE-01 | Terse prompting prose style | Active, estimated only |
| STK-CATFULL-00 | Paste whole files into the prompt by hand | Not recommended for new designs |
Part-number decoder: RTK-DIFF-01 reads as tool RTK, characterized command git diff, revision 01. STK-prefixed parts are site-level techniques not bound to one command. All listed techniques apply to both Claude Code and Codex. The table shows a subset of ordered parts; STK-CATFULL-00 appears for status only and is not characterized in Section 3.
| Rev | Date | Change |
|---|---|---|
| A | 2026-07-18 | First characterization run from rtk gain, global scope. Values subject to revision as sample counts grow. |
| · | · | Reserved. The next characterization run appends here when the live rtk gain feed lands. |
Note: characterization ages. Every figure is a dated snapshot; re-measure as sample counts grow, and prefer a newer revision over a stale one.