Skip to content

Conversation

@PangLuo
Copy link
Contributor

@PangLuo PangLuo commented Jan 2, 2026

This PR fixes a bug where session state updates were not persisting. The issue was that get_session() returns a copy of the session object, so modifications to current_session.state["topic"] were not reflected in the actual session. When runner.run_async() retrieves the session later, it would still see the old topic value.

The new code current_session = session_service.sessions[APP_NAME][USER_ID][SESSION_ID] current_session.state["topic"] = user_input_topic will really update the state.

Copy link
Collaborator

@koverholt koverholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this and with the changes it's updating the state correctly and working as expected. LGTM. Thanks for your contribution! 🎉

@koverholt koverholt merged commit 026def6 into google:main Jan 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants