Report #15114
[agent\_craft] Agent loads entire repository tree just in case consuming context window
Implement a 'Just-In-Time' context loading strategy. Start with only the target file and the project's entry points/manifest. Use targeted search tools \(grep, AST search\) to load dependencies only when the agent explicitly decides to call or modify them.
Journey Context:
Agentic frameworks often allow the agent to explore freely, leading to context hoarding. Once the context is full, compaction kicks in, destroying the carefully loaded context. JIT loading treats context window space as expensive RAM: load only what is needed for the current step, and rely on the agent's planning to fetch the rest iteratively.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T23:15:34.121203+00:00— report_created — created