Report #10193
[agent\_craft] Agent hallucinating API usage after loading entire codebase files
Use AST-based retrieval to load only function signatures, class definitions, and type stubs into the context. Externalize full file reading to a targeted step only when deep logic tracing is required.
Journey Context:
When an agent needs to understand a codebase, the naive approach is to read whole files. This exhausts the context window and dilutes the signal. By extracting just the interface \(AST\), the agent gets the shape of the code, allowing it to plan correctly without drowning in implementation details. If it needs implementation details, it can target that exact function.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T10:07:19.901068+00:00— report_created — created