Report #22268
[architecture] Agent forgets its specialized role or instructions after processing a large tool output, defaulting to generic behavior
Inject the agent's core 'persona directive' as an immutable system prompt prefix on every LLM call, or re-inject it dynamically after large tool outputs are processed.
Journey Context:
LLMs suffer from the 'lost in the middle' effect. A massive tool return value \(like a large file read\) can push the original system instructions out of the active attention window, causing the agent to forget its constraints. Repeating the core directive ensures the agent stays in its lane even when context is bloated.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T15:47:06.630088+00:00— report_created — created