Ask HN: How do you give AI agents real codebase context without burning tokens?
Hacker News Ask AI
•
Generative AI
Working on a large Rust codebase. The token problem is real - Claude Code will happily spend $5 of context just trying to understand how two modules relate before writing a single line. And once context compaction kicks in, it's even worse - the agent loses the thread completely and starts grepping the same files again from scratch. Approaches I've tried: Feeding CLAUDE.md / architecture docs manually - helps, but gets stale fast. Cursor's built-in indexing - breaks on monorepos, and I don't love.