·2 min read

The context window is everything

Most developers waste their context window without realizing it.

Every token you send competes for attention. Long files and dead code dilute the signal. The AI doesn't just read your context, it reasons within it. More noise means worse reasoning.

I learned this the hard way. Early on, I'd dump entire files into Claude and wonder why the output missed the point. I was feeding it everything instead of the right things.

What changed my results: keeping files small, one component per file. When a file does one thing, the AI grasps it immediately. When a file does five things, it guesses which one you care about.

Naming matters more than I expected. A function called calculateDepreciationForABFCategory gives the AI more context than calc ever could. Good names are free documentation that don't cost extra tokens.

I also started deleting aggressively. Dead code confuses AI the same way it confuses new team members. Unused functions, commented-out blocks, outdated TODOs. When choosing which files to include in a session, three relevant files beat ten tangentially related ones. I think of each session as a context budget: what's the minimum the AI needs to do this well?

This sounds like normal code hygiene. It is. But AI raises the stakes. Messy code that a human navigates with patience becomes messy context that an AI navigates with confusion.