Skip to content

fix: Enable state context in AgentExecutor#1273

Open
hemasekhar-p wants to merge 1 commit into
google:mainfrom
hemasekhar-p:a2a-drops-state-fix
Open

fix: Enable state context in AgentExecutor#1273
hemasekhar-p wants to merge 1 commit into
google:mainfrom
hemasekhar-p:a2a-drops-state-fix

Conversation

@hemasekhar-p

Copy link
Copy Markdown
Contributor

Link to Issue or Description of Change

1. Link to an existing issue (if applicable):

Problem:
During Agent-to-Agent (A2A) communication, AgentExecutor.java triggers execution by invoking a 4-argument overload of runner.runAsync(). This specific signature in Runner.java hardcodes stateDelta to null, completely discarding any custom state or metadata passed during the interaction instead of properly propagating it to the session history

Solution:
To fix this issue, updated the AgentExecutor to extract the metadata from the RequestContext and directly invoking the 5-argument version of runAsync.

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.

Checklist

  • I have read the CONTRIBUTING.md document.
  • My pull request contains a single commit.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end.
  • Any dependent changes have been merged and published in downstream modules.

@hemasekhar-p hemasekhar-p force-pushed the a2a-drops-state-fix branch from fed65f8 to 1380f9f Compare June 16, 2026 14:28
@hemasekhar-p hemasekhar-p self-assigned this Jun 16, 2026
@hemasekhar-p

Copy link
Copy Markdown
Contributor Author

@anFatum, Could you please review this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A2A communication drops state context by invoking 4-argument runner.runAsync

1 participant