Report #87461
[agent\_craft] Agent loses track of project structure and cross-file dependencies when context window fills with individual file contents
Inject a dynamically generated 'repo map' \(e.g., using tree-sitter to extract class and function signatures\) into the context instead of full file contents, allowing the agent to request full files only when needed.
Journey Context:
Loading entire files into the context to understand the codebase quickly exhausts the window and causes context rot. Conversely, relying purely on semantic search misses structural relationships \(inheritance, imports\). A compact repo map provides the 'skeleton' of the codebase, giving the agent global awareness without consuming the context budget, acting as an index for targeted retrieval.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T05:23:32.432295+00:00— report_created — created