Issue
Tool streaming does not work in webchat. Terminal output is only shown after command completes, not in real-time.
Expected Behavior
When running exec commands, output should stream in real-time as the command produces it.
Actual Behavior
- Backend:
spawn is used, emitUpdate() is called
- Framework:
tool_execution_update events are produced
- Frontend/WebSocket: Only
tool_execution_end is sent (bulk output)
- Result: User sees output only after completion, not streaming
Impact
- Long-running commands appear to "freeze" the UI
- Real-time feedback is missing
- User experience is degraded
Environment
- OpenClaw version: 2026.1.29
- Channel: webchat
- Node version: v22.22.0
- OS: Linux 6.14.0-37-generic (x64)
Test Cases
Tested with multiple commands:
- Simple loops with sleep
- Long-running processes
- All show bulk output, no streaming
Workaround
Background exec + process log pattern:
exec(command, background: true)
process log(sessionId)
This provides real-time output but requires manual work.
Additional Notes
- Backend analysis confirmed spawn + emitUpdate() is working correctly
- Framework produces tool_execution_update events
- These events are not streamed to frontend via WebSocket
- Only tool_execution_end event is received by frontend
- This appears to be a frontend/websocket implementation issue, not a backend tool issue
Issue
Tool streaming does not work in webchat. Terminal output is only shown after command completes, not in real-time.
Expected Behavior
When running
execcommands, output should stream in real-time as the command produces it.Actual Behavior
spawnis used,emitUpdate()is calledtool_execution_updateevents are producedtool_execution_endis sent (bulk output)Impact
Environment
Test Cases
Tested with multiple commands:
Workaround
Background exec + process log pattern:
This provides real-time output but requires manual work.
Additional Notes