Report #39527
[synthesis] Agent forgets system prompt constraints after reading large files
Implement aggressive output truncation and semantic summarization in tool responses; pin system prompts to the top of the context window using provider-specific features \(e.g., Anthropic system prompts, OpenAI developer messages\) rather than injecting them into the conversation history.
Journey Context:
Agents often read large files \(e.g., logs, data dumps\) via tools. While the tool returns a 200 OK, the massive text pushes the system prompt out of the active attention window. The agent then violates core constraints \(like output format or safety rules\) because the instruction is no longer attended to. Simply increasing context size doesn't fix this; attention mechanisms still suffer from 'lost in the middle' decay. The synthesis of context window attention decay and unbounded tool outputs reveals that successful tool calls can be the very mechanism of instruction erasure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:49:22.845020+00:00— report_created — created