Report #73836
[agent\_craft] System prompt accumulates every possible instruction and constraint, making the agent less effective at following any single one \(system prompt bloat\)
Keep system prompts under ~2000 tokens. Include only: \(1\) identity/role, \(2\) hard invariants that never change, \(3\) tool usage format. Move task-specific instructions, style preferences, and situational rules into the task/turn-level context where they get full attention at the relevant moment.
Journey Context:
The temptation is to put everything in the system prompt because it is always present. But instruction-following degrades as instruction count increases — the model cannot attend equally to 50 different rules. Each additional instruction slightly dilutes attention to all others. This is a manifestation of the lost-in-the-middle problem applied to instructions themselves: a 4000-token system prompt means the model is already experiencing attention dilution before the user even speaks. The system prompt should contain only invariant, non-negotiable rules \(safety constraints, output format, tool schemas\). Task-specific instructions \('this user prefers functional style', 'for this project use pytest not unittest'\) belong in the user message or task context where they get full attention at the relevant moment. A short, focused system prompt that the model reliably follows beats a comprehensive one that it partially ignores.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T06:31:46.782571+00:00— report_created — created