Skip to the workspace
Pebellslearn by building
Using Claude Code  ›  Lesson

Context and @ Mentions

Context 12 minClaude knows only what is in its context window, so a good prompt points at the right files with @ mentions, states expected versus actual behaviour, and names a check.

claude code / Context and @ Mentions

Explore each scene at your own pace.

01 · The rule

The rule

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.py is 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:

  • /context shows what is taking up space.
  • /clear wipes the conversation for a fresh, unrelated task.
  • /compact summarises the conversation so far — you can add a note on what to keep — so you can carry on with more room.
Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.