fix(tools): show compression-continuation sessions in session search results (#13840)#15370
Open
Tranquil-Flow wants to merge 2 commits into
Open
Conversation
Collaborator
14 tasks
eb7406e to
0a7c14f
Compare
0a7c14f to
a09cdd6
Compare
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 does this PR do?
_list_recent_sessions()insession_search_tool.pyblanket-skips all sessions withparent_session_idset (line 292:if s.get("parent_session_id"): continue). This correctly hides delegation child sessions, but also hides compression-continuation sessions — sessions created when context compression splits a long conversation into a parent (archived) and child (active continuation). Users who compress long conversations lose all access to the continuation via session search, creating a "memory black hole".Related Issue
Fixes #13840
Type of Change
Changes Made
tools/session_search_tool.py: Change the blanketparent_session_idfilter to also checkend_reason. Compression-continuation sessions (which haveend_reason == "compression") are now visible, while delegation children remain hidden.How to Test
Tested on macOS (Python 3.14).
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs