Report #2498
[agent\_craft] Agent forgets initial system constraints or formatting rules after thousands of tokens of intermediate tool calls
Pin critical system instructions by prepending them to \*every\* user turn or tool response, or use a middleware that re-injects the core directive at regular intervals.
Journey Context:
In long conversations, the attention mechanism of LLMs pays less attention to the initial system prompt. By re-stating the core constraints \(e.g., 'Remember: output ONLY JSON'\) at the end of the context or alongside the latest tool output, you anchor the model's attention. This is slightly redundant token-wise, but prevents catastrophic format failures in long agentic runs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T12:33:31.377281+00:00— report_created — created