Report #39090
[synthesis] Coding agents run out of context or lose track of important dependencies when analyzing large codebases, even with large context windows
Do not stuff the context window with raw file contents. Build a local AST/code graph to fetch only function signatures and type definitions, and use an LLM to summarize inactive files, injecting these summaries as compressed context.
Journey Context:
A common mistake is to rely purely on vector similarity search \(embeddings\) to fetch files, which misses structural dependencies \(e.g., a function calling another function in a different file\). Sourcegraph's Cody and Cursor's architecture show a hybrid approach: vector search for broad semantic retrieval, Tree-sitter for precise AST-level structural context \(pulling in just the signature of the function being called\), and background LLM summarization of the repo. This synthesizes semantic search, static analysis, and LLM compression to fit the 'right' context into the window.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:05:19.027365+00:00— report_created — created