fix(coding-agent): explain compaction cap recovery - #875
Open
rlaope wants to merge 1 commit into
Open
Conversation
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
per-turn-caprejection across direct prompts, queued retry continuations, post-compaction admissions, and blocked follow-up admissionscancelled-by-extensionregression, add cap-specific coverage for the missed admission paths, and update changelog plus real-CLI QA contractsWhy
A long-lived runtime can accept ten compactions and then reject the next required compaction. Core previously replaced that structured rejection with:
That left the actual reason in debug logs and made a resumed session look hung while prompts remained blocked or queued.
This intentionally corrects the "session" wording introduced in #731.
acceptedAbsolutelives in the builtin extension'screateInitialState()closure and is not serialized, so the absolute cap is runtime-scoped and resets when the CLI restarts. The extension reason and core fallback now compose to the same byte-identical user message.Verification
npm run checknpm run build.agents/skills/senpi-qa/scripts/scenarios/compaction-absolute-cap-qa.mjs --self-test: 6/6 passed, including ten accepted compactions, the 11th rejection text, post-rejection prompt survival, and unchanged real authSummary by cubic
Explain absolute compaction-cap recovery and preserve the rejection cause in
coding-agent.RequiredCompactionErrorand appends a clear message that the absolute cap is runtime-scoped and how to recover (restart the CLI to resume the session or start a new session). The builtin extension now uses the same wording; both paths produce byte-identical text.Review notes
rejectionCapturethrough_checkCompaction,_runPrePromptCompaction, and_runAutoCompaction;RequiredCompactionErrornow accepts an optional cause and formats a combined message._blockedPostCompactionAssistantstoresrejectionCauseso post-compaction admissions surface the same message.per-turn-capfor API stability; the wording changes from “session” to “runtime.”_runAutoCompaction.Migration
“Compaction rejected: the absolute compaction cap was reached for this runtime. Restart the CLI to resume this session, or start a new session.”
Written for commit dc1c94f. Summary will update on new commits.