You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Declarative agent A2A: SessionNotFoundError due to user_id mismatch between session-create and session-get #1882
Inbound A2A message/send to a Declarative ADK agent fails with SessionNotFoundError. kagent-adk._agent_executor creates the session
through kagent-controller's API under one user_id, but google.adk.runners._get_or_create_session then looks the same session
up under a differentuser_id, so the GET 404s and execution aborts.
Any A2A request to a Declarative agent over its operator-managed A2A
Service. Inbound JSON-RPC envelope carries a non-empty context_id.
Trace (sanitized — log lines reformatted, no internal IDs)
step
call
result
user_id used
1
GET /api/sessions/?...
404
A2A_USER_
2
POST /api/tasks
201
(auth-derived)
3
POST /api/sessions
201
(auth-derived)
4
POST /api/tasks
201
(auth-derived)
5
POST /api/sessions//events?user_id=
201
← different
6
GET /api/sessions/?...
404
A2A_USER_ ← mismatch
7
SessionNotFoundError: Session not found:
<CTX> = the inbound A2A request's context_id. <AUTH> = the user_id injected by the controller's auth layer
(in unsecure mode this is the controller's static fallback identity).
Activity
timfdev commentedon May 18, 2026
Same issue here
fix(adk): pass user_id as query param in create_session to fix Sessio…
fix(adk): pass user_id as query param in create_session to fix Sessio…