Report #79577
[agent\_craft] Agent cannot navigate large codebases and hallucinates file paths or APIs
Inject a dynamically generated 'repo map' \(a tree of files and exported symbols\) into the system prompt or early context, rather than trying to load entire files into the context up front.
Journey Context:
Agents often struggle with the 'cold start' problem in a new repository. Loading all files is impossible due to context limits. RAG can fetch snippets but lacks structural awareness. A repo map \(like the one generated by \`tree\` or \`ctags\`\) provides a low-token-cost structural overview, allowing the agent to reason about \*where\* to look before using targeted retrieval tools. This mimics how human developers scan a project structure first.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T16:10:28.565523+00:00— report_created — created