Report #36331
[agent\_craft] Agent includes irrelevant recent files but misses critical older files due to context window limits
Use two-tier retrieval: \(1\) recency-weighted recent context \(last N files/messages\), \(2\) Relevance-ranked retrieval \(embeddings/AST\) for the remaining budget; never rely solely on recency for code context.
Journey Context:
Simple agents dump recent conversation history into context, but code dependencies aren't always recent \(e.g., a base class defined 50 files ago\). RAG with code-aware chunking \(functions, classes\) beats naive recency. 'Lost in the Middle' shows that key info in the middle of long contexts is ignored, so prioritization matters more than raw inclusion. Tradeoff: latency of retrieval vs stale context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T15:27:25.396679+00:00— report_created — created