fix(session): pass ctx/user/session_id into async commit memory extraction#610
Merged
qin-ctx merged 1 commit intovolcengine:mainfrom Mar 15, 2026
Merged
Conversation
…ction commit_async() called extract_long_term_memories(messages=...) without passing user, session_id, or ctx. Because the compressor returns early when ctx is None, async commits always produced memories_extracted=0. The sync commit() path already passes all three parameters correctly. This aligns the async path to match. Regression from the COW pattern revert (volcengine#584) which dropped these arguments from the async call. Fixes volcengine#602
qin-ctx
approved these changes
Mar 15, 2026
Contributor
Author
|
Thanks for the review and merge, @qin-ctx! |
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
Session.commit_async()callsextract_long_term_memories()without passinguser,session_id, orctx. Because the compressor returns early whenctx is None, async session commits always producememories_extracted = 0even when the archived messages contain extractable memories.Why this matters
commit()path correctly passes all three parameters (session.py:263-267)Changes
openviking/session/session.pyline 338: Added the three missing keyword arguments to match the sync path:Testing
user,session_id,ctxif not ctx: return []) atcompressor.py:134is the root causeruff format --checkandruff checkpassFixes #602
This contribution was developed with AI assistance (Claude Code).