Report #91691
[agent\_craft] Context overflow when sending large repositories
Use Tree-sitter to extract a 'repo map': function/class signatures and docstrings only \(not full bodies\) for dependency files, while keeping full text only for the target file under edit. This reduces tokens by 80-90%.
Journey Context:
Naive truncation cuts off recent context. Full file content for dependencies is wasteful when the agent only needs to know the API surface \(signatures, types\) to make correct calls. AST-based extraction preserves the necessary interface information while shrinking context. This is the technique used by the Aider coding agent to handle large repos within context limits.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T12:29:39.040676+00:00— report_created — created