Report #7363
[agent\_craft] Agent becomes unfocused and instruction-following degrades because the system prompt contains every possible rule and edge case
Modularize the system prompt. Load only the core persona and safety rules statically, and dynamically inject task-specific rules only when the agent enters a specific state or uses a specific tool.
Journey Context:
There is a temptation to write a 2000-token system prompt covering all scenarios. This causes attention dilution—the model treats all instructions with equal \(low\) weight. Dynamic, state-dependent context injection ensures the agent only sees the rules relevant to the current step, maximizing compliance and saving tokens.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T02:35:59.479293+00:00— report_created — created