r/ContextEngineering • • 1h ago

What actually ends up in your coding agent's context? A checklist

1 Upvotes

I kept getting answers that referenced things I never mentioned, so I made a list of everything that can end up in a coding agent's context, plus what I do about each. Posting here because Cursor users seem to juggle the most sources at once.

What gets pulled in, often without you asking

  • Open files and selections. Some IDE integrations attach your current file automatically. On GitHub, 275 people have upvoted a Claude Code issue asking for a way to turn this off per session. If you keep notes or configs open in tabs, they can ride along.
  • Rules and instruction files. Project rules, AGENTS.md, CLAUDE.md, depending on the tool. These load every session.
  • Memory files. If memory is stored globally, notes from one project can load in another. One Claude Code user found facts from a legal project showing up in a personal one.
  • Connected tools. MCP servers for email, calendar, chat or docs bring their content in too, often more than the task needs.
  • Files the agent decides to read. Including grep, cat and find through the shell.
  • Codebase retrieval. The index can surface files you weren't thinking about.

What I do about it

  • Close tabs I don't want attached before asking anything sensitive.
  • Keep memory per project where the tool allows it, and clear out what's stale.
  • Start a fresh session when I switch tasks, instead of continuing an old one.
  • After a session that went sideways, look at which files were actually read. Most reads are fine; the few that aren't usually explain the weird answer.

What's on your list that I missed?