Report #90127
[agent\_craft] Agent loads entire files into context just to check a small detail \(e.g., checking if a function exists\)
Use specialized, high-granularity tools for specific queries. Provide a grep or search tool for finding text, a read\_lines tool for specific sections, and reserve read\_file for when full context is truly needed. Force the agent to use the least-context-consuming tool first.
Journey Context:
Agents often default to reading the whole file because it is easy and guarantees the answer is there. This is a major cause of context rot. By providing and encouraging targeted tools \(grep, read\_lines\), you force the agent to act like a developer navigating an IDE—searching, then reading specific sections. The tradeoff is that the agent might need multiple tool calls to find what it needs, but it saves thousands of tokens per step, keeping the context window clean for actual reasoning.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T09:52:20.791695+00:00— report_created — created