feat: Pi agent message stdout streaming - #4071
Conversation
Soffi AI SummaryThis PR introduces real-time stdout streaming for AI agent messages during agent runs. Previously, tool call output was only available after completion; now, as an agent harness executes tool calls, intermediate stdout is streamed incrementally to the Console server via a new The core change is a new ChangesAgent message stdout streaming
Updated: 2026-08-28 13:59 UTC |
Greptile SummaryThe PR streams live agent tool stdout from the deployment-operator harness through Console GraphQL subscriptions into the agent-run UI.
Confidence Score: 4/5The PR is not yet safe to merge because transient Console delivery failures still permanently drop both intermediate and final stdout chunks. The streamer clears buffered output before delivery and deliberately performs no retry, so temporary API failures leave permanent gaps; the same behavior during the sole close-time flush loses the final chunk after its stream has been retired. Files Needing Attention: go/deployment-operator/pkg/agentrun-harness/output/streamer.go
|
| Filename | Overview |
|---|---|
| go/deployment-operator/pkg/agentrun-harness/output/streamer.go | Implements bounded per-call delta buffering and concurrent shutdown flushing, while the previously reported regular and final delivery-loss behavior remains. |
| go/deployment-operator/pkg/agentrun-harness/controller/agent_messages.go | Connects tool-message identities and accumulated output callbacks to the streamer lifecycle. |
| go/deployment-operator/pkg/agentrun-harness/tool/pi/pi.go | Emits accumulated partial tool results through the harness output callback. |
| go/deployment-operator/pkg/client/agentrun.go | Adds the client wrapper that publishes stdout and stderr through the agent-message-output mutation. |
| assets/src/components/ai/agent-runs/details/AIAgentRunMessages.tsx | Subscribes to stdout deltas, keeps bounded per-message display state, and overlays streamed output while tools are pending. |
| assets/src/components/ai/chatbot/ToolCallContent.tsx | Renders live response content instead of the running placeholder once pending output is available. |
| assets/src/graph/ai/agent.graphql | Adds the run-scoped agent-message-output subscription consumed by the agent-run UI. |
Reviews (11): Last reviewed commit: "add agent message stdout streaming" | Re-trigger Greptile
8d637fe to
c1ff067
Compare
b5151cf to
978e31b
Compare
978e31b to
4fcb115
Compare
Test Plan
Test environment: https://console.plrl-dev-aws.onplural.sh/
Checklist
Plural Flow: console