A system prompt sets the agent's role, boundaries and behavior before any user input arrives, and it stays constant across a whole conversation (AI at Yale). In an agent the model also chooses tools, plans steps and decides when it is done, so the prompt is the primary control surface for that loop, not a backstory (Prompt Engineering Guide). When agents fail in production, the usual cause is that the right context was not passed to the model at the right moment, not that the model was too weak (LangChain docs).
Tool errors are where that gap bites hardest. If the only instruction is a task description, an agent that receives a 503 has nothing to reason from: it may silently invent a result, retry forever, or give up with no explanation. Teams that treat tool guidance as part of the prompt define which tools exist, when to use each, and what to do when one fails, including graceful degradation and escalation (Redpanda docs). A dedicated error section makes those rules apply to every call rather than to one task.
The structural argument is about attention. Context is a finite resource, and model recall degrades as the context window fills (Anthropic context engineering). If error rules are buried inside step-by-step task text, they compete with everything else and get diluted as the trajectory grows. A short, delimited block that says "these rules apply whenever a tool returns or fails" survives that growth and is easy to version on its own. Keep the block near the end of the stable part of the prompt so it stays in the prefix cache, since even a single changed token early in the prompt invalidates the cache from that point (Manus).



