Stop the agent-session proxy from silently dropping createTime/title - #1346
Merged
Conversation
ADKSession (core/web/apiv2/agents.py) only declared id/appName/userId/ state/events/lastUpdateTime, so constructing it from the agent service's actual response (which already includes createTime and, as of this change, title) silently discarded those fields -- Pydantic drops unknown keys by default. The frontend's session picker fell back to raw session IDs because of this, even before session titles existed.
4 tasks
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
ADKSessionincore/web/apiv2/agents.pyonly declaredid/appName/userId/state/events/lastUpdateTime. Constructing it from the agent service's actual JSON response silently dropped any other field (Pydantic's default behavior), includingcreateTime-- which the frontend has been trying to use for session labels/sorting since it was added, and which was silently alwaysundefinedbecause of this gap.titlefield (auto-derived from the session's first message) to the same response -- without this fix, that would've been silently dropped too.Test plan
tests/apiv2/agents.py: assertscreateTime/titlepass through when present, and that their absence (older sessions) doesn't break anything.apiv2suite run -- no regressions (2 pre-existing failures confirmed unrelated:tasks.py'stest_search_export/test_search_tasksfail identically on a cleanmainwith no changes at all, an eventual-consistency issue in this specific dev environment).ruff check/format --checkandty checkclean.