Silently Injected Context
Before your message reaches the model, the system silently prepends a rich context payload:
• System prompt — personality, rules, capabilities
• Open files — what you’re currently looking at
• Recently viewed files — what you were working on
• Git status — branch, staged changes, diffs
• OS and workspace info — paths, shell, environment
• Rules files — project-specific instructions (AGENTS.md, .cursorrules)
• Linter errors — current problems in open files
Why This Matters
This injected context is invisible to you but gives the agent awareness of your project without you explaining anything. When you say “fix the error,” the agent already knows which file has the error, what the error message is, and what branch you’re on.
The Token Cost
All this context consumes tokens from the model’s context window. A typical agent session starts with 3,000–8,000 tokens of injected context before you type a single word. This is why context engineering (Ch 7) is critical — every wasted token in the system prompt is a token the agent can’t use for reasoning about your actual task.
Practical tip: Keep your rules files concise. A 500-line AGENTS.md file consumes ~2,000 tokens on every single request. Under context pressure, agents may skip advisory rules entirely. Put only critical, non-obvious instructions in rules files.