feat(core): schedule provider compaction automatically - #47324
Merged
Merged
Conversation
nexxeln
force-pushed
the
auto-native-compaction
branch
from
September 7, 2026 12:15
ca022cb to
f80699f
Compare
nexxeln
force-pushed
the
auto-native-compaction
branch
from
September 7, 2026 12:46
f80699f to
b199818
Compare
nexxeln
force-pushed
the
auto-native-compaction
branch
from
September 7, 2026 13:23
b199818 to
6a03744
Compare
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
threshold, clamped to the model's usable input ceiling; omitted thresholds use that ceiling. Like local scheduling, automatic provider scheduling needs a positive catalog context limit.compaction.auto: falseauthoritative for new automatic work while preserving installed native context. Wait for fresh primary usage after a native checkpoint before scheduling again.SessionHistory.load(..., "local")). Do not fall back for authentication, rate limits, cancellation, arbitrary failures, or manual native errors.Third layer of the Core provider-compaction stack.
Validation
bun run test: 5,235 passed, 35 skipped; Core/Schema/Protocol/Server/Client/SDK/TUI/Session UI/UI typechecks passed.providers.openai.compaction: { mode: "provider", threshold: 10000 },gpt-5.4-mini) with both an API-key connection and a ChatGPT credential: automatic compaction fired at the step boundary withreason: "auto"and an installedproviderContext, the runner waited for a fresh usage anchor before compacting again, manual/compactworked on top of the installed window, and a fact from before the checkpoints was recalled afterwards. Server logs contained no warnings or errors.