Motivation
Hosted-agent streaming can defer target execution until after the route handler returns a streaming response. In that deferred phase, inbound request span context may no longer be current, causing child spans from agent/chat/tool execution to lose strict parent-child linkage.
Scope
- Apply a host-wide fix in agent-framework-hosting stream adapters (not Responses-only).
- Preserve existing stream lifecycle behavior (close semantics, hook ordering).
- Add regressions at host level and Responses integration level to lock parent-span propagation for deferred streaming.
Motivation
Hosted-agent streaming can defer target execution until after the route handler returns a streaming response. In that deferred phase, inbound request span context may no longer be current, causing child spans from agent/chat/tool execution to lose strict parent-child linkage.
Scope