Report #49073
[agent\_craft] Context window overflow when loading large repositories or missing critical distant dependencies
Use a RepoMap-style hierarchical summary: feed the model a compressed 'map' containing all file paths, class/function signatures, and dependency graphs \(generated via tree-sitter or ctags\) rather than full file contents; only include full content for files immediately relevant to the task.
Journey Context:
Naive RAG or sliding window approaches either drop critical distant context \(e.g., a type definition three files away\) or exceed token limits. The RepoMap technique \(popularized by aider\) constructs a lossy but semantically rich summary of the entire repository using static analysis. This allows the model to reference any symbol in the codebase without paying the token cost of full files. The tradeoff is that the model cannot see implementation details of distant functions, but it knows they exist and their signatures, which is sufficient for most refactoring and debugging tasks.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T12:51:14.140839+00:00— report_created — created