fix(gateway): resume should follow compression continuations#15403
Closed
simbam99 wants to merge 1 commit into
Closed
fix(gateway): resume should follow compression continuations#15403simbam99 wants to merge 1 commit into
simbam99 wants to merge 1 commit into
Conversation
Collaborator
Contributor
|
Merged via #15418 — your commit was cherry-picked onto current main with your authorship preserved (rebase-merge). Also added your AUTHOR_MAP entry in scripts/release.py so release notes credit you correctly. Thanks! |
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
Gateway
/resumewas restoring the titled parent session after compression instead of the live continuation child that actually holds the transcript.This aligns gateway resume behavior with the CLI by resolving the resumed session ID through
SessionDB.resolve_resume_session_id()before switching sessions.Problem
Context compression ends the current session and creates a child continuation linked via
parent_session_id.The gateway
/resumeflow already resolved a title to a session ID, but it did not follow the compression continuation chain afterward. That meant:/resume <title>could switch to the compressed parent sessionFix
GatewayRunner._handle_resume_command()ingateway/run.pyto pass the resolved target session throughresolve_resume_session_id()tests/gateway/test_resume_command.pythat creates a compressed parent + child continuation and verifies/resumeswitches to the child and counts its messagesHow to test
Result:
Manual check: in a gateway session, trigger
/compressto create a continuation child, then run/resume <title>— the gateway now reopens the live child transcript instead of the compressed parent.No platform-specific code paths were touched (no file I/O, process management, or shell command changes), so behavior should be identical on Linux and macOS.
Files changed
gateway/run.py— route resolved session ID throughresolve_resume_session_id()tests/gateway/test_resume_command.py— regression test for compression-continuation resume