fix(coding-agent): reopen over-budget resumed sessions - #1430
Open
code-yeongyu wants to merge 3 commits into
Open
fix(coding-agent): reopen over-budget resumed sessions#1430code-yeongyu wants to merge 3 commits into
code-yeongyu wants to merge 3 commits into
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.
Incident
OmO Desktop thread
a9a178a0-47c4-4b55-a94b-64b6c7e0f565could not be reopened. Everythread.turn.startfailed because the restored transcript was already 41,249 tokens over the Astra resume requirement, and the desktop exhausted its retries.Root cause
createAgentSessioncalledsession.assertModelUsable(..., admission: "resume")before the compaction extension was wired. The budget guard correctly refused the next provider prompt, but the session itself became unopenable, so no compaction could run.This is the third fix in the family: senpi #1425 made overflow recovery independent of
compaction.enabled, and #1427 shipped the OpenAI input caps. This PR closes the remaining hole: a session that ALREADY exceeded the window can never be reopened.Change
resume-admissioncompaction entry throughSessionManager.appendCompaction. The JSONL transcript is preserved verbatim, and tool-call/tool-result pairs are not split.ModelUsabilityBudgetErroris rethrown unchanged.resume_admission_slicesession-log line with dropped-entry count, tokens before/after, model, and shortfall.Admission runs before extension wiring, so the summary is an equivalent minimal deterministic checkpoint rather than importing the extension runtime's deterministic-fallback implementation. The changelog records this boundary explicitly.
Verification
cd packages/coding-agent && bunx vitest --run test/suite/resume-admission-recovery.test.tsfailed at the old resume admission guard withModelUsabilityBudgetErrorand the missing accessor.cd packages/coding-agent && bunx vitest --run test/suite/resume-admission-recovery.test.ts— 1 file, 2 tests passed.cd packages/coding-agent && bunx vitest --run test/suite/model-usability-budget.test.ts test/suite/model-shrink-speculative-warmstart.test.ts test/suite/model-usability-review.test.ts— 3 files, 17 tests passed./tmp/ulw-sidecar-20260907/box-test.sh; no tests were run locally.The release window is live. Do not merge until the release window lifts.
Summary by cubic
Fixes restored sessions that exceed the model's token budget so they can be reopened instead of failing every
thread.turn.start. Do not merge until the release window lifts.Bug Fixes
resume-admissioncompaction entry.ModelUsabilityBudgetErroris rethrown unchanged.Written for commit 962d631. Summary will update on new commits.