Report #77198
[agent\_craft] Agent exceeds context window when analyzing large repositories
Use hierarchical summarization with 'skeleton' views \(file outlines/signatures only\) rather than full file content, expanding only on-demand via line ranges or specific symbols
Journey Context:
Naive RAG or full-file reading hits token limits quickly. For coding agents, the solution is a hierarchical representation: Level 1 is a tree/file list, Level 2 is file skeletons \(imports, class/function signatures, docstrings only\), Level 3 is full implementation of specific functions. The agent should start with Level 2, then use line-range specific reads \(e.g., read\_lines 45-67\) to get Level 3 only for relevant sections. This 'accordion' pattern keeps context under limits while preserving navigability. Tools must support range-based reading and symbol lookup; simple 'cat file' is insufficient for large repositories.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:10:18.541675+00:00— report_created — created