Apple Machine Learning Research on Oct. 12 posted a paper describing SELFCOMPACT, a method for condensing an AI agent's working context. SELFCOMPACT is a scaffold that leaves the timing and form of compaction to the model itself. Compaction here means the model calling a tool that summarizes the context it has built up. That tool is not enough by itself, the authors say. Across open-weight models, it was used unevenly, often at unhelpful moments or not at all. So the method pairs the tool with a short rubric. Their rubric fires the tool when a sub-task has resolved or the trajectory is converging. It holds compaction back mid-derivation or when the model is stuck.
Key facts from the paper's abstract
- Method: SELFCOMPACT, a scaffold that leaves the timing and form of compaction to the model itself.
- Two parts: A compaction tool the model invokes on its accumulated context, plus a lightweight rubric.
- Compact when: A sub-task has resolved, or the trajectory is converging.
- Hold off when: The model is mid-derivation, or stuck.
- Training: No fine-tuning or external supervision.
- Tests: Seven models on six benchmarks, in competitive math and agentic search.

Why a summary tool alone falls short
The authors frame SELFCOMPACT as two elements that work as a pair. The first is the compaction tool, which the model invokes on its own accumulated context. The second is a lightweight rubric. Without the rubric, the tool was used unevenly across open-weight models. It was often invoked at unhelpful moments, or not invoked at all. Their rubric sets two moments to fire the tool and two to hold it back.
From token thresholds to task-state cues
The authors contrast this with how existing agent scaffolds handle a growing context. Those scaffolds compact at fixed intervals. A token threshold triggers each compaction. SELFCOMPACT instead leaves the timing and form of compaction to the model. Its cues describe the state of the task, such as whether a sub-task has resolved.
We propose SELFCOMPACT, a scaffold that allows the model itself to decide when and how to compact.
How the rubric decides
The authors' rubric gives the model four cues, split into two groups. First, compact when a sub-task has resolved. Second, compact when the trajectory is converging. Third, do not compact in the middle of a derivation. Fourth, do not compact when the model is stuck. Each of these four cues is paired with one action, compact or wait.
Compact or wait? The SELFCOMPACT rubric
Pick an agent's current state and see whether the authors' rubric says to compact its context or wait.
Where is the agent in its work right now?
- Work has resolved or is converging → next question
- Work is mid-derivation or stuck → next question
Which of these describes the agent?
Source: Apple Machine Learning Research, Oct 12, 2026Which of these describes the agent?
Source: Apple Machine Learning Research, Oct 12, 2026
The rubric says to fire the compaction tool when a sub-task has resolved, so the model summarizes its accumulated context.
Source: Apple Machine Learning Research, Oct 12, 2026The rubric says to fire the compaction tool when the trajectory is converging.
Source: Apple Machine Learning Research, Oct 12, 2026The rubric says to suppress compaction mid-derivation, so the model keeps its context as it is.
Source: Apple Machine Learning Research, Oct 12, 2026The rubric says to suppress compaction when the model is stuck.
Source: Apple Machine Learning Research, Oct 12, 2026Shows only the cues and actions stated in the paper's abstract, not how a model recognizes each state.
What the authors say they tested
The abstract reports empirical results on six benchmarks and seven models. The benchmarks span two areas, competitive math and agentic search.
No retraining step
The authors say the tool and rubric together elicit adaptive compaction. They add that this needs no fine-tuning and no external supervision. Both elements work at inference time, when the model is being run rather than trained.
Analysis: the scaffold supplies the timing
The hard part of self-managed context is timing. Having the tool does not settle when to call it. Left alone, the open-weight models in the paper often used it at unhelpful moments. The rubric turns that timing into a few plain checks about the task. The two cues that fire describe work that has produced a result or is closing in on one. The two that wait describe work that is still open. A stuck agent might seem like a good moment for a clean summary. The rubric says to wait. One reading is that a summary taken mid-derivation or while stuck could drop steps the agent still needs. A second point concerns where the timing rules are kept. Because the authors report no fine-tuning, those rules are part of the scaffold, outside the model's weights. If that holds up, the same rubric could be tried on existing models without retraining them. The authors' tests cover six benchmarks across seven models.
Limitations
The abstract does not name the six benchmarks or the seven models, and its test results are the authors' own report.
Where to go deeper
Look to the full paper for the six benchmarks, the seven models and the exact wording of the rubric. The abstract is on the Apple Machine Learning Research page.
Sources: Apple Machine Learning Research, Oct 12, 2026
ZIPMEX promotes trading on trade.zipmex.com. Promotions are labelled and kept separate from news coverage, which is selected and checked without regard to them. Perpetual futures are leveraged derivatives. Prices can move fast and you can lose all of your margin. Not available in every jurisdiction. Not investment advice.