Repository navigation
Keep long-session context recovery from stranding agent loops - #1042
Merged
Yeachan-Heo merged 1 commit intoJun 23, 2026
Merged
Yeachan-Heo merged 1 commit into
Yeachan-Heo merged 1 commit into
Conversation
Constraint: preserve agent-core assistant-tail continuation invariant Rejected: changing model metadata | current source metadata already matches the observed model window Confidence: high Scope-risk: moderate Directive: keep future overflow recovery tests credential-free and event-driven Tested: bun --cwd=packages/coding-agent run check:types; bun --cwd=packages/agent run check:types; focused overflow, queue, TTSR, EventController, compaction, remote-compaction tests; source CLI version smoke Not-tested: live OpenAI remote compaction call
3 tasks done
Owner
|
MERGE_READY Adversarial review for PR #1042 ( Evidence checked:
No merge-blocking regression or contract/security blocker found in the changed auto-compaction/context recovery surface. — |
Owner
|
MERGE_READY Red-team merge-gate review focused on the changed auto-compaction/context-recovery paths only. Evidence:
No blocker found in the changed context recovery path. Maintainer can merge. — |
jason931225
pushed a commit
to jason931225/gajae-code
that referenced
this pull request
Sep 18, 2026
…n-Heo#1042) Constraint: preserve agent-core assistant-tail continuation invariant Rejected: changing model metadata | current source metadata already matches the observed model window Confidence: high Scope-risk: moderate Directive: keep future overflow recovery tests credential-free and event-driven Tested: bun --cwd=packages/coding-agent run check:types; bun --cwd=packages/agent run check:types; focused overflow, queue, TTSR, EventController, compaction, remote-compaction tests; source CLI version smoke Not-tested: live OpenAI remote compaction call
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.
What
agent.continue()paths through pre-continue context maintenance, with explicit skip flags for immediately-post-maintenance paths.Why
Long sessions could enter context-full maintenance and still fail with
context_length_exceededor leave the UI looking stuck when the rebuilt tail could not be resumed withAgent.continue(). This keeps the low-level assistant-tail invariant intact while giving the session layer a deterministic fallback and clearer user-visible recovery state.Recreated against latest
devafter #1041 was closed for targetingmain.Testing
bun test packages/coding-agent/test/agent-session-auto-compaction-continue.test.tsbun test packages/coding-agent/test/agent-session-auto-compaction-queue.test.tsbun test packages/coding-agent/test/agent-session-concurrent.test.ts -t TTSRbun test packages/coding-agent/test/modes/controllers/event-controller-auto-compaction.test.tsbun test packages/coding-agent/test/compaction.test.tsbun test packages/agent/test/compaction-estimate-cache.test.ts packages/agent/test/remote-compaction.test.tsbun --cwd=packages/coding-agent run check:typesbun --cwd=packages/agent run check:typesbun --cwd=packages/coding-agent src/cli.ts --versiongit diff --checkbun checkpasses