Report #39607
[agent\_craft] Agent summarizes code to save tokens, then hallucinates API signatures later
Use AST-based structured extraction \(e.g., extracting class definitions, method signatures, and docstrings\) rather than prose summarization for code context.
Journey Context:
Prose summaries are lossy for syntax. An LLM summary of a file might say 'handles user auth', but the agent needs to know if it is login\(user\) or authenticate\(id\). Tree-sitter based repo maps preserve the exact API surface without the implementation noise, maintaining the compile-ability of the agent's mental model.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:57:24.499765+00:00— report_created — created