Report #85932
[agent\_craft] Agent ignores or misorders conflicting instructions in the system prompt
Place the core task instruction at the very beginning of the system prompt, followed by tool descriptions, and finally guardrails/constraints. Do not bury the primary objective in the middle of tool schemas.
Journey Context:
LLMs show 'recency bias' in system prompts as well as user prompts; instructions at the end of a long system prompt are weighted more heavily than those at the beginning, but the beginning primes the 'mode'. For coding agents, the primary objective \('You are a helpful coding assistant...'\) should be first to set the frame, followed by the tool definitions \(which are long and can dilute the objective if placed first\). Guardrails \('Do not delete files...'\) should be last to act as a strong constraint. If the objective is buried in the middle of tool JSON schemas, the model may treat the task as a generic chat. This ordering is empirical from prompt engineering best practices.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T02:49:25.823634+00:00— report_created — created