← News

Agents & MCPSources: arXiv · 1 Dec 2026

Study finds compaction design shapes whether a coding agent keeps its plan

A preprint reports that a coding agent often abandoned its chosen approach after its context was compressed, and that a new compaction method preserved the original direction more often than two alternatives.

In plain words

When a coding agent's memory of a session fills up, it is replaced by a shorter summary, and the agent can then lose track of what it was doing. The authors tested three ways of doing this and found their method kept the agent on its original course more often. The work is a preprint based on one coding session, so broader results are not yet shown.

What was announced

In a preprint on arXiv, researchers examined what happens when an LLM coding agent's context window fills and compaction replaces its history with a shorter version. Rather than judging compaction by benchmark scores or whether information survives, they asked whether the agent carried on with its task as before. Using the Pi coding-agent harness, they compared Pi's default model summary with transparent-compact-pi (TC), their own design, and pi-vcc, a third-party extension with a similar approach.

The test case came from a real agentic-coding session in which an agent using a local model, Qwen3.8-27B, settled on a solution but, after its first compaction and before building anything, changed course and produced a workaround instead. The researchers forked the session just before compaction and ran 35 runs per arm. TC continued the pre-compaction direction significantly more often than both alternatives, while with compaction switched off the agent continued in all 15 runs. Ablations showed weaker results without TC's agent-facing guidance or its access to earlier reasoning. A second model, GPT-6.1 Terra, showed the same advantage for TC. The authors frame compaction as a metacognitive problem: it disrupts the agent's knowledge of its own intentions.

What it does not show

  • The evidence is an abstract covering a single natural coding session, so the findings may not generalise to other tasks or settings.
  • The reported significance comes from the authors' own runs; no independent confirmation is available in the supplied material.

For security and IT teams

Scope
The study covers the Pi coding-agent harness with two alternative compaction methods and one natural session, tested with Qwen3.8-27B and repeated on GPT-6.1 Terra.

Sources

Source-support review completed 5 Dec 2026. This story was drafted with AI assistance and checked against retained source passages. Automated checking is not independent verification.

Coverage: arXiv: abstract.

Updates and corrections

No corrections so far.

First published 5 Dec 2026

New to the subject? AI from the Ground Up starts from the beginning.