Apple proposes SelfCompact: the agent decides for itself when to compress context

Apple ML Research has described SelfCompact, a framework for LLM agents in which the model decides when and how to compress its accumulated context. Most systems today trigger compaction at a fixed token threshold. That trigger ignores the structure of the trajectory and can discard an intermediate result in the middle of a derivation or a search. SelfCompact has two inference-time elements. The first is a compaction tool that the model calls itself. The source is truncated, so metrics and benchmarks are not yet known. - The compression decision moves from the framework to the model. - The problem: stale context "anchors" generation. - The available excerpt gives no quality figures.

AI-processed from Apple ML Research; edited by Hamidun News
Apple proposes SelfCompact: the agent decides for itself when to compress context
Source: Apple ML Research. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceApple ML Research ↗
Editor-in-Chief
Key metric #1The compression decision moves from the framework to the model.
The problemstale context "anchors" generation.
Key metric #3The available excerpt gives no quality figures.

Researchers at Apple ML Research have proposed SelfCompact, a framework for LLM agents in which the model itself chooses when and how to compress its accumulated history. The design rests on two elements that run at inference time. The first is a compaction tool that the model calls to summarize the accumulated context. Instead of a rigid rule like "compress when N tokens are reached," the agent makes the decision. The fragment of the abstract available to us breaks off during the description of the first element. The second element and any numerical results are not visible in it, so the method's effectiveness cannot yet be judged by the numbers.

The problem: context that gets in the way of thinking

Long agent trajectories consist of chains of reasoning and tool calls. As the agent works, outdated content piles up in them: intermediate hypotheses, rejected options, bulky search results. The authors point to two consequences. First, this tail "anchors" subsequent generations: the model keeps relying on material that is no longer relevant. Second, the trajectory sooner or later outgrows the context window.

Current practice works like this: the framework counts tokens and triggers compression when a threshold is reached, at regular intervals. This is easy to implement, but the approach has a weak spot. The trigger cannot see the structure of the task. The threshold can fire in the middle of a mathematical derivation or a multi-step search, and a partial result that has not yet taken shape as a conclusion either gets cut or loses important details.

What SelfCompact changes

The idea is to hand the decision to whoever knows the state of the reasoning best: the model itself. It receives a compaction tool and calls it the same way it would call search or a code interpreter. The agent can finish a subtask, record its conclusion, and only then compress the history. It also decides what goes into the summary: which facts to keep and which intermediate steps to treat as closed.

The phrase "inference-time elements" suggests an add-on layer on top of the model rather than a change to its architecture. The available text does not say this directly, so it cannot be considered confirmed. If it is the case, the method could be tested on existing models without fine-tuning.

What is known from the source

  • Author: Apple ML Research, published October 12, 2026.
  • Method name: SelfCompact.
  • Baseline for comparison: fixed-interval compaction triggered by a token threshold.
  • Method composition: two inference-time elements, the first being a compression tool the model calls.
  • Benchmarks, model sizes, accuracy gains, and token savings are not given in the available fragment.

How to use this in practice

Until the full text is available, SelfCompact is best treated as a testable hypothesis. Teams building long-running agents for coding, research, or support should do a few things.

First: go through your agents' logs and find cases where threshold-based compression fired at a bad moment. The signs are an agent repeating a search it has already done, losing an intermediate result, or returning to a rejected hypothesis. If there are many such cases, this topic is relevant to you.

Second: set up a small experiment. Give the model a compression tool with clear instructions on when to use it, and compare it with your current trigger on the same set of tasks. The metrics here are obvious: the share of tasks completed successfully, tokens per task, and the number of repeated steps.

Third: build in safeguards against bad behavior. The model may compress too often or, conversely, not compress at all until the window overflows. It is sensible to keep a hard threshold as a safety net and treat the model's decision as the primary mechanism.

The paper matters because it moves control of an agent's memory from the infrastructure layer into the model's own area of responsibility. How well this works will become clear once the full results are published and compared against interval-based schemes on long tasks.

Story

Key Questions Answered

What are the key details on The problem: context that gets in the way of thinking?

Long agent trajectories consist of chains of reasoning and tool calls. As the agent works, outdated content piles up in them: intermediate hypotheses, rejected options, bulky search results. The authors point to two consequences. First, this tail "anchors" subsequent generations: the model keeps relying on material that is no longer relevant. Second, the trajectory sooner or later outgrows the context window. Current practice works like this: the framework counts tokens and triggers compression when a threshold is reached, at regular intervals. This is easy to implement, bu

What SelfCompact changes?

The idea is to hand the decision to whoever knows the state of the reasoning best: the model itself. It receives a compaction tool and calls it the same way it would call search or a code interpreter. The agent can finish a subtask, record its conclusion, and only then compress the history. It also decides what goes into the summary: which facts to keep and which intermediate steps to treat as closed. The phrase "inference-time elements" suggests an add-on layer on top of the model rather than a change to its architecture. The available text does not say this directly, so i

What is known from the source?

Author: Apple ML Research, published October 12, 2026. Method name: SelfCompact. Baseline for comparison: fixed-interval compaction triggered by a token threshold. Method composition: two inference-time elements, the first being a compression tool the model calls. Benchmarks, model sizes, accuracy gains, and token savings are not given in the available fragment.

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Autonomous AI Agents

Delegate Deep Research, Coding & Workflows to an AI Agent

Deploy autonomous multi-step execution with NomadNet Agent (agent.nomadnet.ai) — automated web research, data synthesis, code generation, and complex task orchestration.

Launch NomadNet Agent →NomadNet AI Platform
What do you think?
Loading comments…