Skip to content

fix(golang-adk): resolve user identity from A2A call context - #2444

Open
buravc wants to merge 2 commits into
kagent-dev:mainfrom
buravc:fix(golang-adk)/userid-propagation
Open

fix(golang-adk): resolve user identity from A2A call context#2444
buravc wants to merge 2 commits into
kagent-dev:mainfrom
buravc:fix(golang-adk)/userid-propagation

Conversation

@buravc

@buravc buravc commented Aug 14, 2026

Copy link
Copy Markdown

AI Disclosure: This PR was created with an AI agent under my supervision.

Fixes #2443

This PR fixes task/chat history disappearing after 0.10 upgrade.

Tasks were saved and read under admin@kagent.dev instead of the real
user. A2A splits task execution and task persistence into separate
goroutines off a shared context. auth.WithUserID only rebinds a local
copy, so the persistence goroutine never saw it, sent an empty
x-user-id, and the controller's UnsecureAuthenticator fell back to
admin@kagent.dev.

Introduced in #2354 (a2a-go v0.3.x -> v2 migration), which switched
task execution to the SDK's producer/consumer goroutine model.

taskstore now reads the caller from a2asrv.CallContext, which is
attached before the fork so both goroutines see it. Falls back to the
old behavior otherwise.

Added a test with conflicting CallContext/context values, confirmed it
fails without the fix.

Signed-off-by: buravc <avcii.brk@gmail.com>
@buravc
buravc requested a review from supreme-gg-gg as a code owner August 14, 2026 15:26
@github-actions github-actions Bot added the bug Something isn't working label Aug 14, 2026
@github-actions github-actions Bot added bug Something isn't working and removed bug Something isn't working labels Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Chat sessions are not persisted on 0.10.0-rc2 using Golang ADK

1 participant