Description
During Agent-to-Agent (A2A) communication, AgentExecutor.java triggers execution by calling runner.runAsync. However, it uses the 4-argument signature. Looking at Runner.java, this specific overload explicitly hardcodes /* stateDelta= */ null, completely dropping any custom state or metadata passed during the interaction.
To support agents that pass metadata or state deltas to guide downstream processing, AgentExecutor should extract this context and pass it into the 5-argument version of runAsync.
Code Reference
- The Call Site (AgentExecutor.java)
AgentExecutor invokes the 4-argument method inside the execute pipeline:
return runner.runAsync(
getUserId(ctx),
session.id(),
content,
agentExecutorConfig.runConfig()); // <-- ISSUE: Invokes 4-arg variant
- The Root Cause Overload (Runner.java)
In Runner.java, the 4-argument variant forces the state delta to be null:
public Flowable<Event> runAsync(
String userId, String sessionId, Content newMessage, RunConfig runConfig) {
return runAsync(userId, sessionId, newMessage, runConfig, /* stateDelta= */ null); // <-- ISSUE: Hardcoded null
}
Expected Behavior
AgentExecutor should extract the incoming state/metadata from the RequestContext ctx (or the incoming Message) and invoke the 5-argument version of runAsync so that the stateDelta is properly propagated into the session history.
Runner.java
AgentExecutor.java
Description
During Agent-to-Agent (A2A) communication,
AgentExecutor.javatriggers execution by callingrunner.runAsync. However, it uses the 4-argument signature. Looking atRunner.java, this specific overload explicitly hardcodes/* stateDelta= */ null, completely dropping any custom state or metadata passed during the interaction.To support agents that pass metadata or state deltas to guide downstream processing,
AgentExecutorshould extract this context and pass it into the 5-argument version ofrunAsync.Code Reference
AgentExecutor invokes the 4-argument method inside the execute pipeline:
In Runner.java, the 4-argument variant forces the state delta to be null:
Expected Behavior
AgentExecutor should extract the incoming state/metadata from the RequestContext ctx (or the incoming Message) and invoke the 5-argument version of
runAsyncso that thestateDeltais properly propagated into the session history.Runner.java
AgentExecutor.java