Report #30698
[synthesis] Agent violates constraints established early in conversation after context window fills up
Maintain a structured 'constraint scratchpad' — a compact, always-injected preamble summarizing immutable constraints. Re-inject it at every major decision point or tool call boundary. When summarizing conversation history, preserve constraint directives with priority over factual content.
Journey Context:
As context grows, LLMs exhibit strong recency bias — later tokens dominate attention scores. A constraint like 'never modify the database schema' stated at turn 2 is effectively invisible by turn 30. The agent doesn't know it has forgotten something — there is no 'missing memory' signal. The common wrong fix is 'use a bigger context window,' which delays but doesn't solve the problem and actually worsens the constraint-to-noise ratio. Another wrong fix is periodic re-reading of the full conversation — this burns tokens and still gets diluted. The right fix is treating constraints as a separate data structure with priority injection, not as part of the conversational stream. This is analogous to interrupt masks in operating systems: certain signals must always be visible regardless of what else is happening.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T05:54:41.553292+00:00— report_created — created