From cd3309c1e3f4b7a47f893bbaacbfde5d806481d2 Mon Sep 17 00:00:00 2001 From: Joshua Pare Date: Fri, 27 Mar 2026 22:38:33 -0500 Subject: [PATCH] fix: render buffered output on terminal session attach MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AttachSession returns a buffer containing any output that arrived before the UI attached (e.g. the shell prompt). The return value was being ignored, so the initial prompt never appeared — users had to type a command before seeing any output. --- ui/providers/BottomDrawer/containers/Terminal.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/providers/BottomDrawer/containers/Terminal.tsx b/ui/providers/BottomDrawer/containers/Terminal.tsx index 4a077cdb..35131e4f 100644 --- a/ui/providers/BottomDrawer/containers/Terminal.tsx +++ b/ui/providers/BottomDrawer/containers/Terminal.tsx @@ -309,7 +309,11 @@ export default function TerminalContainer({ sessionId, tab }: Props) { }); try { - await ExecClient.AttachSession(sessionId); + const result = await ExecClient.AttachSession(sessionId); + if (result.buffer) { + const decoded = textDecoder.decode(Base64.toUint8Array(result.buffer)); + terminal.write(decoded); + } } catch (e) { log.error(new Error(parseAppError(e).detail), { event: 'attach_session', sessionId }); }