fix(coding-agent): required-compaction review fixes for #679 - #684
Merged
Conversation
Accepted required-compaction recovery clears the stored admission rejection when its queued continuation is scheduled, so the originating prompt resolves after the queued steer completes instead of throwing the superseded RequiredCompactionError.
Retained-message sizing fails closed on accessor-bearing, non-plain, cyclic, or callable values and exits early once the remaining context budget is exceeded, instead of eagerly serializing every retained message and executing persisted property getters.
Pin the turn-end soft-cap reset across degradation-recovery early returns, close the unasserted third faux call in the continuation regression, and record the admission-supersession and bounded-sizing changes in changes.md.
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
Stacked on top of #679 (contains its commit plus fixes). Addresses every verified blocker from the
[sisyphus-bot]brutal review (review id 4844512307):prompt()resolves after the queued steer completes instead of throwing the supersededRequiredCompactionError(reproduced 2/2 runs before the fix).contextWindow - reserveTokensbudget is exceeded; previously a 32 MiB retained message cost ~207 MiB peak and persisted property getters executed during sizing.changes.md.One review item (stale provenance across runs) was declined after reproduction: the harmful path cannot trigger because agent_end classification also requires a still-over-threshold context, which the successful run-2 compaction eliminates.
Verification
npx tsc --noEmit(coding-agent) exit 0; rootnpm run checkexit 0.local-ignore/qa-evidence/20260803-pr-679-brutal-review/.Summary by cubic
Fixes required-compaction recovery so accepted recovery resumes the queued continuation and the original prompt resolves instead of throwing a stale error. Also bounds deterministic fallback sizing to avoid unsafe executions and large memory spikes.
prompt()resolves after the queued steer/follow-up completes.agent_start; only retry when the error is confirmed for the current turn, so provider lookalike errors don’t trigger recovery.turn_end(infinally) so later provider turns can compact again; keep enforcing the absolute session cap for all routes.Written for commit fb0604c. Summary will update on new commits.