What a single paste actually costs your context window

Rather than estimating the impact of pasting code and terminal outputs into an AI prompt, we measured four real-world files directly. Using a disclosed tokenizer and a cross-check with a second model family, these measurements reveal the exact cost of common clipboard pastes in both tokens and dollars.

Method

What we measured

Token consumption and context window share for four typical pastes
Sample Characters Tokens when pasted vs. a 19-token path Share of a 200k window Pastes until the window is full
Terminal log, 400 lines (git log --stat) 16,609 5,646 297x 2.8 % 35
Swift source file, 2,348 lines 169,223 40,324 2,122x 20.2 % 4
package-lock.json, first 800 lines 30,890 11,178 588x 5.6 % 17
CLI output, 193 lines (git help -a) 12,005 2,169 114x 1.1 % 92

Characters per token

Our measurements showed 2.94 characters per token for terminal logs, compared to 4.20 characters per token for source code. Logs are more expensive because hashes, paths, and numbers are rarely merged, and that is precisely the material you copy in a terminal.

What it costs in money

Below are the calculated costs based strictly on pure input tokens without caching:

API input costs per paste at Sonnet ($3 per million input tokens) and Opus ($5 per million input tokens) rates
Sample Sonnet (3 $/M) Opus (5 $/M)
Terminal log, 400 lines $0.0169 $0.0282
Swift source file, 2,348 lines $0.1210 $0.2016
package-lock.json, 800 lines $0.0335 $0.0559

Individually these costs are fractions of a cent or a few cents per paste. The key factor is that the same text is re-sent in every subsequent request of the same session — four pasted source files and the window is full, after which compaction begins.

What this means

  1. A 2,348-line source file costs 20 percent of your context window. The path to that same file costs 0.01 percent.
  2. Four pastes like that and the window is full — not after four hours of work, after four Cmd+V.
  3. Logs are the most expensive kind of text you can paste: 2.94 characters per token versus 4.20 for source code.

CtxVault automatically turns large clipboard pastes into local text files before they hit your terminal, giving your AI CLI a 19-token file path to read on demand instead of a window-filling wall of text.