Apple ML Proposes SELFCOMPACT: Letting Agents Decide When and How to Compress Their Own Context

Apple ML Research · rss · 2026-10-12

Apple ML Research introduces SELFCOMPACT, a scaffold addressing context pollution in long-running language model agents.

Problem: long agent traces of chain-of-thought and tool calls accumulate stale content that anchors later generations and eventually overflows the context window. Existing scaffolds compact at fixed token thresholds, ignoring trajectory structure and risking discarding partial results mid-derivation or mid-search.

Approach: SELFCOMPACT lets the model itself decide when and how to compact, via two inference-time elements:

The work targets agent memory/context management and will appear as an Apple ML research paper.

Original post →

More from coding & agent

coding & agent channel →