Terse logo

Terse

Archives
Log in
Subscribe
June 5, 2026

Your git diff is costing you 30K tokens

T
TERSEISSUE 002 · JUNE 2026

THE TERSE LETTER · 4 MIN READ

Your git diff is
costing you 30K tokens

Every turn. And most of it is noise you will never read.

When Claude Code runs git diff, it dumps the entire output into your context — routinely 30,000 to 60,000 tokens on a busy branch.

You pay for every one of them, every turn they stay in context. Here's how to cut that by 90% without losing a thing Claude needs.

01Where the tokens go

A 200-line change can weigh 40,000 tokens.

Most of that isn't your change. It's unchanged context lines, whitespace, vendored code, and — the silent killer — lockfiles. A single package-lock.json diff can be 20K tokens on its own.

Cost per turn · large diff in context

Full diff$0.45 / turn
 
Filtered diff$0.06 / turn
  
→ Over a heavy week, that's roughly $300/year back.
02The fix

Show Claude the change, not the whole repo.

Scope the diff to what actually moved. Exclude generated files, ignore whitespace-only churn, and let Terse compress anything you paste in by hand.

✗ BLOATS CONTEXT

Full file dumps
package-lock.json
Whitespace-only lines
Vendored / build output

✓ LEAN DIFF

Changed hunks only
--ignore-all-space
Skip lockfiles
Source files only
Terse floating optimizer bar

Paste a giant diff into Terse — it strips the noise before it ever hits your token budget.

03Action items

Three things to do right now.

1

Gitignore the noise from diffs

Add lockfiles and build output to a diff pathspec so Claude never sees them: git diff -- . ':(exclude)*-lock.json'.

2

Ignore whitespace churn

Run diffs with --ignore-all-space. Reformatting commits stop eating thousands of tokens.

3

Run big pastes through Terse

Dropping a long diff into the chat by hand? Terse compresses it first — watch the token count fall in real time.

Download Terse — free to start →

macOS · Free forever tier · 1,500 optimizations/week

NEXT WEEK

The politeness tax. "Please", "thank you", "could you possibly" — I measured exactly what good manners cost you per million tokens. The number surprised me.

Until then — stay terse.

— James
Builder of Terse · terseai.org

You're getting this because you subscribed at terseai.org. One email per week. No spam, ever.

Don't miss what's next. Subscribe to Terse:
← Newer The politeness tax on your AI bill Older → How I cut my Claude bill by 73%
Twitter
terseai.org
Powered by Buttondown, the easiest way to start and grow your newsletter.