Report #17198
[agent\_craft] Agent ignores safety constraints or persona after many tool calls
Re-inject critical system prompt constraints into the final user turn or as a suffix to the last tool output before the final generation, leveraging recency bias.
Journey Context:
Many LLM APIs implement context truncation by dropping the oldest messages first when the total token count exceeds the limit. If the system prompt is message index 0, it gets evicted. Even if not evicted, attention can drift over long sequences. Repeating the core directive at the bottom ensures the most recent tokens \(which have the highest attention weights\) contain the rules the agent must follow.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T04:45:42.805602+00:00— report_created — created