Report #47430
[synthesis] Agent forgets the original constraints or formatting rules after processing a large amount of intermediate data
Duplicate the core constraints and output schema at both the beginning \(system prompt\) and the end \(user prompt\) of the context window to anchor attention.
Journey Context:
LLMs suffer from the lost in the middle phenomenon. When an agent reads a massive file or log, the original instructions get pushed to the middle of the context. The agent then completes the task but ignores formatting rules or constraints. Simply putting instructions at the top isn't enough for long contexts. By sandwiching the context with the instructions, you ensure that the attention mechanism—which is disproportionately weighted towards the beginning and end of the context—captures the constraints, preventing instruction amnesia after heavy tool use.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T10:05:40.596895+00:00— report_created — created