arXiv Science⌕ Search

arXiv subjects

Felix Woolford

Publications and source records attributed to Felix Woolford.

2 recordsLinked to original sources

Wait...what was I doing? A Case Analysis of How Compaction Methods Shape a Coding Agent's Continuity in Task and Metacognitive Stance

When an LLM coding agent's context window fills, compaction replaces its history with something shorter. Compaction (context compression) methods are usually judged by whether relevant information survives or how a compacted agent performs on benchmarks. We instead ask whether the agent carried on in its task as it was doing before compaction. In the Pi coding-agent harness, we compare Pi's default model summary with two alternatives: transparent-compact-pi (TC), our own design, and pi-vcc, a third-party extension taking a similar approach. We tested them on a natural case from an agentic-coding session, in which an agent using a local model (Qwen3.8-27B) settled on a solution to its task, but after its first compaction, before building anything, changed course and produced a workaround. We forked the session just before compaction and varied the compactor over 35 runs per arm. TC continued the pre-compaction direction significantly more often than both alternatives; with compaction switched off the agent continued it in all 15 runs, supporting the test as a measure of continuity. Without TC's agent-facing guidance on the compacted state, the agent kept its direction somewhat, but not significantly, less often. Without access to the agent's earlier reasoning, TC still kept its direction significantly more often than the alternatives. We interpret the results as pointing to two carriers of an earlier decision across compaction: its explicit statement, here only in reasoning, and its implicit consequences, the prose and actions that followed it. TC appears to carry both more faithfully; a study on a second model (GPT-6.1 Terra) shows the same advantage for TC. We frame compaction as a metacognitive problem: it disrupts the agent's knowledge of its own intentions, and what the compacted context keeps of the agent's earlier words and actions shapes whether it can recognise its earlier plan.

cs.AI↗

Maximising Transparency in Context Compaction Improves Retention of Facts and Commitments for Lightweight Coding Agents

Long coding agent sessions outgrow the model's context window, so agents compact: older history is replaced by something shorter, usually a model-written summary. A summary selects and rewords, and the agent cannot see what was lost. Existing work has explored a range of compaction techniques, but comparatively little attention has been paid to their effectiveness with lightweight models, including those deployed locally or used for high-volume workloads. Here, we present transparent-compact, a simple deterministic method for the open-source Pi coding agent, designed specifically for use with such models and with the purpose of maximising the transparency of the agent's view of its own compacted context. It guarantees that user and assistant prose in its context is unchanged by a model or algorithm, and explicitly flags where compaction has stripped information. We compare it with Pi's default model-written summary compaction and with pi-vcc, a popular deterministic method with similar methods but without verbatim retention of prose. Our benchmarks run on four models of varying performance levels, with emphasis on Qwen3.8-27B: a lightweight model at the top end of what consumer hardware can serve locally. On sets probing commitments (rules the user set which exist only in the conversation) and recall of facts, transparent-compact matched or outperformed both alternatives. In particular, it showed an advantage in avoiding confident blunders, i.e. assertion of false information as opposed to recognizing that something was not recalled. Even with a frontier model, its advantage was present but smaller. We argue that transparent-compact spares lightweight models from reasoning or searching their way around what compaction lost, and results in improved recall and application of information as a result, without the need for task or context-specific structuring of the session history.

cs.AI↗