Course contents
Put it into context
Understand what the agent can see at any moment, why long sessions go stale, and how to hand it exactly the context a task needs.
Every answer an agent gives comes from its context: everything in front of it right now. That's the tool's own instructions, your project's instruction file, the files it has read, your conversation so far, and the output of every command it ran. Nothing else. It doesn't remember yesterday's session, and it can't see your screen unless you show it.
So the quality of the agent's work depends on what you put in front of it, and as much again on what you leave out.
The context window
Context lives in the model's context window, measured in tokens. As of November 2026, many current models have windows of about a million tokens, including Claude Opus 5.5, GPT-6 Astra and Gemini 4 Carbon; Cursor describes Grok 4.7 as having a 256,000-token standard window with a 500,000-token long-context option. That sounds limitless, but two things bite long before the window is full. Everything in it counts toward your usage, and the more there is, the more easily details in the middle get missed.
Illustrative sizes for a 1M-token window; real numbers vary by tool, model and project. Try a whole working day in one session.
Move the controls and watch what changes.
In the explorer, what fills a long session fastest?
What the agent can and can't see
| The agent can see… | The agent can't see… |
|---|---|
| Files in the project, once it opens them | Your screen or your browser tabs |
| The output of commands it runs | Earlier sessions, unless something was saved to a file |
| Screenshots and text you paste in | Your live site, unless it has a tool to fetch it |
| Your instruction file, loaded at the start | What you meant but didn't say |
The right-hand column is where most misunderstandings start. You see the page in your browser; a terminal agent usually doesn't. When something looks wrong, describe what you see or attach a screenshot. When you made a decision in an earlier session, it's gone unless you wrote it into the instruction file or a note in the project. And when the agent seems to be answering a different question from the one you asked, it's usually missing a piece of context you assumed it had.
Fresh sessions beat long ones
After hours in one session, the early details (your constraints, the decision you made at 9am) are buried under everything since. Many agents compact long sessions by summarizing older turns, and summaries drop details. The fix is cheap: start a fresh session for each new task. In Claude Code, /clear starts a new conversation while keeping project memory; in Cursor and most other tools, start a new chat. Anything the agent must always know goes in the instruction file, which loads into every new session automatically.
Give context, don't dump it
- Point, don't paste. “Look at specials.json and archive.html” beats pasting both files. The agent opens them itself and reads only what it needs.
- Show, don't describe. A screenshot of the broken layout, or an example of the output you want, is worth a paragraph.
- Trim the evidence. Paste the error lines that matter, not the whole log.
- Say why. “The owner prints invoices for catering clients” is context no file contains.
Today's task is fixing the archive's month headings. Does each item help the agent, or is it noise?
“The owner reads the archive on her phone”
The rule it forgot
You've worked on the site in one session all day.
Late in the afternoon, the agent adds a JavaScript framework to build a gallery, even though you said “no frameworks” this morning.
Plain-English definitions from the AI Coding Dictionary.