Report #5348
[agent\_craft] Agent system prompt exceeds limits or dilutes attention by including the entire codebase map
Keep the system prompt strictly for persona, rules, and tool schemas. Dynamically inject the codebase map \(repo map\) as part of the user message or a dedicated context message, updating it per turn based on recent edits.
Journey Context:
Developers often stuff the system prompt with static project context. System prompts are cached and heavily attended to, but if they are too large, the model suffers from 'lost in the middle' and instruction-following degrades. Dynamic context belongs in the user/assistant turns or a dedicated dynamic context block, so the model knows it's a changing state, not an absolute rule.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T21:07:56.102321+00:00— report_created — created