Repository navigation
Conversation
Keep canonical history while validating bounded edits to a persisted working view. Reuse compatible actor prefixes for maintenance and retain native compaction for failures, overflow recovery, and explicit requests. Honor explicit projection settings and disabled auto-compaction, defer unused maintenance after final answers, and cover default and native behavior in the session, CLI, persistence, and usage regressions.
Apply the CLI mode after resource discovery reloads settings, so an explicit off selection takes precedence over the default CLM mode. Exercise the real CLI startup path with a local streaming endpoint and keep the config unchanged.
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.
Long sessions currently go straight to native summary compaction when they cross the context threshold. This makes
clm-v1the default: the model first makes a bounded edit of eligible old observations in a working view, while the canonical session history stays intact.Behavior
contextWindow - reserveTokens). CLM maintenance runs before a prompt or after a complete tool turn; a settled answer defers routine maintenance until another request needs the context.Existing explicit
offandlightweight-v1settings remain effective.--context-projection offselects native compaction. Disabling automatic compaction also disables implicit CLM; explicitly selectingclm-v1still permits manual edits./compactremains available for a native summary, and/clm-compactrequests an explicit working-context edit.This PR includes the CLM implementation and its tested cache/fallback behavior. The independent completion verifier is outside its scope.
Validation
pnpm run checkpassed, including formatting, type checking, repository boundaries, and browser smoke checks../test.shpassed with its isolated test environment. Coding-agent: 4,344 passed / 55 skipped; CLI: 666 passed; agent-core: 524 passed / 1 skipped; providers: 435 passed / 6 skipped. The remaining workspace and script tests also passed.offand retain their original assertions.clm-v1as the default. A real CLI regression also verifies that explicit--context-projection offsurvives resource loading and leaves the config file unchanged.