Summary
Streaming 1:1 replies (added in PR #51808) work great for short conversational exchanges, but the final reply is dropped when an agent performs a long tool chain (3+ sequential tool calls spanning 30+ seconds).
Environment
- OpenClaw v2026.4.1
- Microsoft Teams plugin (bundled)
- Single-tenant bot registration
- DM (1:1) conversation
Steps to Reproduce
- User sends a message that triggers multiple sequential tool calls
- Agent begins streaming reply — initial text appears in Teams
- Agent executes 4 sequential
exec tool calls with 10-20 second delays each (~60 seconds total)
- Agent completes tool chain and writes final reply text
Expected Behavior
- Streaming card should continue updating during tool execution (e.g., showing status updates)
- Final reply text should appear in Teams after all tool calls complete
Actual Behavior
- Streaming card shows initial pre-tool text correctly
- Card freezes during tool execution — no updates visible
- Final reply after tool chain (~60 seconds later) is silently dropped
- User only sees the partial initial text
Analysis
The Bot Framework TurnContext proxy still expires after ~30 seconds even with streaming enabled. Short replies work because the streaming card finishes before the proxy timeout. Long tool chains exceed this window.
Possible approaches:
- Heartbeat updates during tool execution — Send periodic
updateActivity calls to the streaming card during tool calls to keep the TurnContext alive (e.g., "Running command 2/4...")
- Proactive fallback — Detect when a turn exceeds a threshold and automatically switch to proactive message delivery (using stored conversation references) for the final reply
- Tool-aware streaming — Emit streaming card updates at tool boundaries (tool start/complete events) to maintain the connection
Workaround
We currently use a hybrid approach:
- Turn-context (streaming) for simple replies with no tools or quick tools (< 15 seconds)
- Proactive
message tool sends for replies after long tool chains (30+ seconds)
This works but requires agent-side awareness of delivery rules, which is fragile and adds complexity to the system prompt.
Related
Summary
Streaming 1:1 replies (added in PR #51808) work great for short conversational exchanges, but the final reply is dropped when an agent performs a long tool chain (3+ sequential tool calls spanning 30+ seconds).
Environment
Steps to Reproduce
exectool calls with 10-20 second delays each (~60 seconds total)Expected Behavior
Actual Behavior
Analysis
The Bot Framework TurnContext proxy still expires after ~30 seconds even with streaming enabled. Short replies work because the streaming card finishes before the proxy timeout. Long tool chains exceed this window.
Possible approaches:
updateActivitycalls to the streaming card during tool calls to keep the TurnContext alive (e.g., "Running command 2/4...")Workaround
We currently use a hybrid approach:
messagetool sends for replies after long tool chains (30+ seconds)This works but requires agent-side awareness of delivery rules, which is fragile and adds complexity to the system prompt.
Related