Report #13123
[agent\_craft] System prompt exceeds token limits or dilutes agent focus by including entire codebase structure
Use a dynamic task-aware system prompt. Inject only the high-level architecture and the specific module interfaces relevant to the current sub-task, rather than the entire repository tree. Use an AST-based repo map to provide just signatures, not implementations.
Journey Context:
Developers often try to cram the whole repo map into the system prompt so the agent knows everything. This causes attention dilution. The agent gets overwhelmed by irrelevant class signatures. A dynamic system prompt, updated based on the current file being edited, provides high-signal context while staying within token limits. Tree-sitter provides deterministic, up-to-date signatures without LLM summarization overhead.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T17:48:28.351206+00:00— report_created — created