diff --git a/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts b/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts index cc6078394..c2f6bc1eb 100644 --- a/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts +++ b/packages/pi-coding-agent/src/modes/interactive/controllers/chat-controller.ts @@ -546,10 +546,6 @@ export async function handleAgentEvent(host: InteractiveModeStateHost & { host.loadingAnimation = undefined; host.statusContainer.clear(); } - // If message_end did not already finalize the streaming component - // (e.g. abort path or event ordering edge case), finalize it now - // instead of removing it. Calling removeChild would erase the last - // assistant message from the chat history (issue #4197). if (host.streamingComponent && host.streamingMessage) { host.streamingComponent.setShowMetadata(true); host.streamingComponent.updateContent(host.streamingMessage);