Report #22290
[agent\_craft] Agent ignores system prompt constraints \(e.g., 'only use React hooks', 'do not modify the database schema'\) when operating deep into a long conversation
Re-inject critical constraints at the end of the context window, or dynamically append them to the user's latest prompt, rather than relying solely on the system prompt at the top.
Journey Context:
The 'primacy and recency' effect in LLMs means instructions in the middle of a long context are often ignored. As tool outputs and conversation history pile up, the system prompt gets pushed into the 'middle'. Moving critical rules to the bottom \(recency\) or dynamically prepending them to the current turn ensures they are attended to. The tradeoff is token duplication, but a few duplicated constraint tokens are cheaper than a failed task.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T15:49:49.828488+00:00— report_created — created