Skip to content
Hrushiekesh Reddy Kanjula
Abstract visualization of a context window filling up with glowing tokens — some bright, some fading

Context Windows, Skills and the Cost of Attention

Every skill, message and attached document draws from the same fixed token budget, so I cut what I load and start sessions fresh.

Published
May 26, 2026
Author
Hrushiekesh Reddy Kanjula
Read time
~6 min
Category
essay

Yesterday I added sixteen new skills to my AI workflow in one afternoon. They cover deep research, email drafting, blog writing and resume tailoring. Each one is a set of instructions that loads automatically at the start of a session.

Then I started thinking about the cost. Sixteen skills at an average of 3,000 tokens each is 48,000 tokens of overhead in every session, whether the skills get used or not.

I used to think of AI as handling the heavy lifting while I handled the small everyday things. That line moved. I let AI take the small things too, including job applications and portfolio updates, without switching between my IDE, GitHub and Vercel. I like it. But I hadn't counted what all those instructions cost while they sit in memory.

Abstract digital art: a glowing context window filling with token streams

What you pay for

Everything an AI processes becomes tokens. That includes your message, its response, the system instructions, the skill definitions, attached files and the conversation history. One token is roughly four characters, or about three-quarters of a word. A thousand words is roughly 1,300 tokens.

The context window is the number of tokens the model can hold at once. It is the model's working memory for the conversation. Modern flagship models hold 128,000 to 1,000,000 tokens. That sounds huge until it fills up, and it fills fast:

ItemTokens
Claude's base system promptaround 23,000 (over 11 percent of a typical context window)
Each skill you add2,000 to 4,400
Sixteen skills at 3,000 each48,000

The skills tradeoff

Load fifty skills and you have pre-filled half your working memory with instructions. The model still works. But on a paid API tier you pay for those tokens on every call, and the cost grows with every turn. One researcher who studied LLM skill efficiency found that over 60 percent of the content in publicly available skills is non-actionable text: preamble, explanation and caveats. It costs tokens and adds nothing to the output.

Load zero skills and you lose consistency. Every session starts from scratch. The AI doesn't know how you write emails or what format your reports take. You explain it again each time. That costs tokens too, just less efficiently.

I wouldn't pick either extreme. Load the skills you will use in this session, not every skill you might need someday. A browser with too many tabs is the same problem. Tabs you aren't using still take memory and slow down the ones you are.

Quality drops before the limit

Quality degrades long before you hit the token limit. Stanford's "Lost in the Middle" paper found that models under-attend to content in the middle of a long context. Information at the start and the end gets more attention. Accuracy on mid-context content dropped by 15 to 20 percentage points compared to content at the edges. The model didn't technically forget it. It stopped weighing it properly.

Engineers call the result context rot: response quality slowly falls as a session grows. The signs are small at first:

  • The AI brings back a pattern you moved away from three messages ago.
  • It asks something you already answered.
  • It hedges where it didn't before, and gets wordy where it used to be precise.
  • Later, it contradicts its own earlier decisions without noticing.

Most people don't recognize this. They assume the model had a bad moment, tweak the prompt and keep going. That makes it worse.

Abstract art: a glowing signal degrading into noise as context fills — warm amber fading to dim red

What developers pay

For casual users, context is a quality problem. For developers calling the API, it is also a money problem.

Token prices vary by nearly two orders of magnitude across providers:

ModelInput (per million tokens)Output (per million tokens)
Gemini 2.0 Flash$0.08not listed
Claude Sonnet$3.00not listed
Claude Opus$15.00$75.00
GPT-4o$2.50$10.00

Model choice and context size multiply each other. A naive agent that re-serializes its whole conversation history on every turn sees cost grow quadratically, not linearly, as the session gets longer.

Three fixes are well known and underused.

Prompt caching has the biggest immediate effect. Cache the static part of your context (system instructions, skills, common reference documents) and the effective per-call cost drops 50 to 90 percent. Most major providers support it as of 2026. Without it, you pay full price for content the model has already seen.

Retrieval-augmented generation beats stuffing. For large codebases, a well-tuned RAG pipeline that pulls 5 to 10 relevant chunks usually outperforms putting the whole repo in context, even when the model could fit it. You get a better signal-to-noise ratio, lower cost and faster inference.

Model routing is cheap. Use the flagship model for reasoning-heavy work. Use a smaller model for classification, summarization or boilerplate. That cuts cost 40 to 70 percent with no meaningful quality loss on suitable tasks.

Habits that help

These work for developers and daily users alike.

  • Scope each session to one task. Start a new conversation per task, not one marathon session. Clean context means less context rot, better responses and fewer follow-ups to fix things.
  • Use compaction. In Claude, /compact summarizes the history instead of carrying it verbatim. It frees window space without losing the thread. /clear resets everything when you switch tasks.
  • Keep a reference file. Write a short document with what you're working on, how you like things structured and what the AI should assume. Point to it at the start of each session. You get continuity without the full history.
  • Test long sessions. Early on, state a specific constraint. Thirty minutes later, ask something that should trigger it. If the model misses it, context rot has started. Start fresh with a short summary of where you are. That is almost always faster than fixing a congested window.

Abstract art: two glowing paths diverging — one ordered and efficient, one tangled and degrading

Where I landed

I don't regret adding the sixteen skills. Each one makes me more effective. But I now think about what sits in the context window before I ask my first question.

The context window is a finite budget, and everything in it is a spending decision. Skills, history, attached documents and system instructions all compete for the same attention. The goal is not to load as much as possible. Load only what earns its place, start fresh often and watch for drift. By the time you notice it clearly, it has been happening for a while.

The place I've applied these lessons most is the Assembly Hub project.

Hire me