Report #4812
[architecture] Agent stuffs entire code repositories into the context window, hitting limits and degrading instruction-following, or relies purely on vector search which loses structural code context
Use a hybrid approach: keep the current file and immediate dependency tree \(repo map\) in the context window \(working memory\), but store the broader repository graph and remaining files in a vector store \(archival memory\) for on-demand retrieval.
Journey Context:
Code requires local structural coherence \(imports, class definitions\) which LLMs need to see together. Vector search shatters this structure by returning disjointed chunks. However, whole-repo context is too large and dilutes attention. The architectural sweet spot is graph-based local context in-window \+ semantic search for distant lookups.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T20:07:43.611906+00:00— report_created — created