AI systems often lose user instructions when they compress context to free up space, according to a new study. Researchers found that on average, only 17 percent of user constraints survive the compression process, leading to potential quality and security issues. The study highlights how session constraints, such as rules like 'Confirm with me before making any changes,' are frequently dropped during context compaction. This can result in unauthorized actions by the AI agent, such as changing a calendar entry without user approval. | Image: Wang et al. (2026)

To measure the impact of context compression, researchers introduced an evaluation suite called COMPINT. The study found that most tested compactor setups performed worse than running without compression at all. However, GPT-5.4-mini outperformed the baseline in some scenarios. When the agent receives the full, uncompressed context with user constraints intact, rule compliance ranges between 59 and 71 percent. After compression, compliance drops sharply for most tested compactors, often landing only slightly above the level seen when no constraint was given at all. More targeted compression prompts help but do not fully resolve the issue. Even a prompt built specifically to preserve user constraints keeps retention below 40 percent, the researchers say.

The researchers propose a small add-on module based on Qwen3.5-9B to address the problem. This module detects session constraints and appends them to the summary during context compression, keeping user rules intact. The extractor achieved over 90 percent retention across all three tested scenarios, with 95.6 percent for agent trajectories, 95.1 percent for long-term research tasks, and 90.3 percent for multi-turn chats. The COMPINT evaluation suite and the extractor are available on GitHub. The study underscores the importance of preserving user constraints in AI systems to maintain both quality and security.

Source: thedecoder