Stop Wasting Your LLM Context Window: A Practical Strategy A developer proposes managing LLM context windows like inventory rather than a gas tank, advocating for a tiered approach to reduce noise and improve model performance. The strategy involves starting with essential context (10-20%), adding reference material (20-30%) only when needed, and using tools like a context manifesto file or IDE-specific context pickers. The developer demonstrates the technique with a React debugging example, showing that targeted context yields faster, more accurate results. You've got 200k tokens. So why do you keep running out of room halfway through your API call? Most developers treat context like a gas tank—fill it up and hope you don't run empty. That's the wrong mental model. Context is inventory. You need to manage it. Here's what actually works. You throw your whole codebase at Claude. You paste the 500-line file. You include the error trace, the full conversation history, and the docs. Then you're surprised when the model says "sorry, I'm out of space." But it's not about space—it's about signal-to-noise. A 200k token context window looks huge until you realize: You're not running out of context. You're drowning in it. Start with this: Tier 1: The Essentials 10-20% of context Tier 2: Reference 20-30% of context Tier 3: Archive optional, 30-50% Rule: Start at Tier 1. Only move up if the model says "I need X to help." Option 1: Cursor-style context picker If you're using Cursor or Claude in your IDE, use the @-symbol to tag only what matters. Don't include your entire project—select the 3-4 files you're actually working on. Option 2: Context manifesto my preference Create a .context file in your repo: CONTEXT.md This PR is about 1-2 sentences Files that matter - src/auth/login.ts — where the bug is - src/types/user.ts — User type definition - tests/auth.test.ts — relevant test Recent context Last 3-5 messages from your conversation, not the whole history To understand this, you need to know - We use bcrypt for password hashing - Sessions are JWT-based - Tests run in Jest with supertest Then just paste the context file + your active files. Full context is worth it when: Full context is a waste when: I was debugging a React state issue. Bad approach: Here's my entire src folder 42 files, 40k tokens : entire src dump Why is my form state not updating? Good approach: Component: UserForm.tsx handles user profile updates Issue: Form fields don't update when user data loads Relevant code: - useEffect hook lines 15-23 that should trigger - setState call line 42 - Form input onChange line 55 Current behavior: Form shows stale data Expected: Form updates within 500ms of data load Here's the component: just the component, 120 lines What am I missing? The model found the issue in 10 seconds: missing dependency in the useEffect array. With the full folder dump, it would've taken longer and used 10x more tokens. Think like you're on a 100MB bandwidth limit even if you're not . Treat context like you treat production deploys. Be intentional. Be minimal. Be clear about what matters. Next time you hit a "context limit exceeded" or "I need more space" error, don't just upgrade to a bigger model. Actually look at what you're sending. Can you remove: Usually you'll cut it by 50% and the model will actually perform better. Want to level up your AI workflow? I send weekly tips on building with LLMs—real patterns, no hype. Join the LearnAI Weekly newsletter https://learnairesource.com/newsletter —it's where developers share what actually works.