Report #55404
[agent\_craft] Putting dynamic project state or retrieved documents into the system prompt, causing instruction dilution and high per-token cost
Reserve the system prompt strictly for immutable persona, core constraints, and tool usage rules. Inject dynamic context \(retrieved code, file contents, task state\) into the user message turn or a dedicated context message role.
Journey Context:
Because the system prompt is always 'first', developers often dump everything there. This is an anti-pattern. First, the system prompt is cached/paid for on every single turn; bloating it with dynamic state that changes is inefficient. Second, LLMs weigh the most recent user message heavily when determining the next action; if the relevant context is stuck in the system prompt while the user message is just 'continue', the agent may lose the thread. Separating 'Rules' \(System\) from 'State' \(User/Context\) keeps instructions crisp and state mutable, ensuring the model doesn't confuse core directives with transient data.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T23:29:13.410314+00:00— report_created — created