Context and @ Mentions
Claude does not remember yesterday's session unless you resume it, and it cannot see what is in your head. Everything it knows about the current task sits in one place: the context window. Good results come from putting the right things there, and leaving the rest out.
The rule
Claude knows only what is in context, so put the right things there.
The context window is the session's working memory. It holds Claude Code's own instructions, your CLAUDE.md, the conversation, and every file read and command output so far. It is large but finite. As it fills up, Claude Code summarises older parts to make room, and fine detail can be lost. More is not better, either: irrelevant material dilutes the parts that matter. And a new session starts almost empty — just the instructions plus whatever you give it — which is why facts you need every time belong in CLAUDE.md.
Ways to put things in:
@mentions. Type@followed by a path to pull a file into the conversation; autocomplete helps you find it.@pricing.pyis quicker and more precise than "the pricing file".- Paste error messages, stack traces or screenshots.
- Say where to look: a function name, a test name, a web address.
Ways to manage it:
/contextshows what is taking up space./clearwipes the conversation for a fresh, unrelated task./compactsummarises the conversation so far — you can add a note on what to keep — so you can carry on with more room.
The shortcut
A clear prompt answers three things: where, what, and how you'll know. Where: the files, via @. What: expected versus actual, with a real example. How you'll know: the check.
In @pricing.py, weekly-plan customers are charged the one-day price.
Expected: 7 days at ₹100 with 10% off is ₹630; we charge ₹700.
test_weekly_plan in @tests/test_pricing.py covers this case.
Don't change the tests. Run pytest when you're done.Vague
"fix pricing" — Claude must search, guess what is wrong, and may fix the wrong thing.
The trap is mentioning whole folders "just in case". It floods the context, costs tokens, and buries the one file that matters.
Drills
Answer fast — trust the rule.
What does writing @tests/test_pricing.py in your prompt do?
The pricing fix is done, and your next task, delivery routes, is unrelated. What is the best move?
Which prompt gives Claude the best context?
You are in the middle of a long task and Claude has started losing track of earlier decisions. What helps most?
Remember
- Claude knows only what is in context;
@puts the right file there. - Shortcut: where, what, and how you'll know.
- Trap: flooding context with folders "just in case", or dragging an old task into a new one instead of using
/clear.
