3 Perception: What your agent sees determines what it does
This chapter covers
- Diagnosing perception as the primary agent failure bottleneck
- Prioritizing inputs with Context Triage
- Compressing context via Semantic Compaction
- Navigating unfamiliar codebases with Progressive Discovery
- Upgrading Argus with observability
"Context engineering is the delicate art of filling the context window with just the right information at just the right time."
—Anthropic, Effective Context Engineering for AI Agents (2025)
A pull request changed 180 lines across four files. To review it, I gave the agent the diff, the full source of every file in the repository (about 2,000 files), the project documentation, and three weeks of Git history. The assumption behind that choice was that more context could only help. It did not.
The agent spent most of its output analyzing a utility file that was not part of the pull request, producing four confident paragraphs about an irrelevant risk. Meanwhile, it missed the defect exposed by one of the relevant tests. That test had been in the context window the whole time. The cause was in how I had loaded the window. I had treated it like a database: throw everything in, let the model sort it out. A context window behaves more like a spotlight, and the beam has a shape: bright at the edges, dim in the middle [1]. The relevant test sat in the dim part of the beam, surrounded by 180,000 tokens of noise.