feat: add context compaction to the rlm harness - #2459
Draft
mikasenghaas wants to merge 9 commits into
Draft
Conversation
mikasenghaas
force-pushed
the
feat/rlm-compaction
branch
6 times, most recently
from
August 28, 2026 23:37
9afc13a to
78d363f
Compare
The same optional CompactionConfig as the bash harness, crossing ACP as a flat policy (compaction toggle + summarize_at_tokens). Pin nano-rlm 0e97b0b, which implements the matching engine-side design. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mikasenghaas
force-pushed
the
feat/rlm-compaction
branch
from
August 28, 2026 23:45
78d363f to
3b98836
Compare
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CompactionConfigto the RLM harness as the bash harness carriescompactiontoggle plussummarize_at_tokens0e97b0b, which implements the matching engine-side designStacked on #2454 (bash compaction + the interception
/v1/modelsrelay) so that PR can merge first.Companion: nano-rlm #147 — merge before this one.
Breaking
RLMHarnessConfig.summarize_at_tokensmoves toRLMHarnessConfig.compaction.summarize_at_tokensand no longer accepts a(lo, hi)range.compactionunset to disable proactive and reactive compaction.Verification
uv run pytest -q tests/v1— passed; live E2E tests skipped withoutPRIME_API_KEYTerminal-Bench 2 e2e: 8 tasks, local vLLM
poolside/Laguna-XS-2.1at 32k (glm45 reasoning + glm47 tool parsers),compaction = {}so the engine discovers the threshold itself (32768 − 16384 = 16384). Trace analysis of the pinned engine:/modelsdiscovery crashing on Python 3.10 containers (rawcast_toparse; nowmodels.list()), and two interactions with main's new semantic-edges bookkeeping - a failed checkpoint attempt and a resampled unusable reply each left the compaction's summary-request claim held, killing the retry with "compaction already has a summary request".🤖 Generated with Claude Code