From 03af821aa5c2c351a566528af565539097f48011 Mon Sep 17 00:00:00 2001 From: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Date: Thu, 24 Sep 2026 13:12:42 -0500 Subject: [PATCH] fix(core): restore the shell no-output placeholder (#51187) --- packages/core/src/shell.ts | 6 ++---- packages/core/test/tool-shell.test.ts | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/core/src/shell.ts b/packages/core/src/shell.ts index 472ab0a0b58..76d6677892c 100644 --- a/packages/core/src/shell.ts +++ b/packages/core/src/shell.ts @@ -240,10 +240,8 @@ const layer = () => if (page.output.endsWith("\n")) lines.pop() const truncated = latest.size > maxBytes || lines.length > maxLines const text = lines.length > maxLines ? lines.slice(-maxLines).join("\n") : page.output - const notice = truncated - ? `${text ? "\n\n" : ""}[full output saved to ${info.file}]` - : "" - return { output: `${text}${notice}`, truncated } + const notice = truncated ? `\n\n[full output saved to ${info.file}]` : "" + return { output: `${text || "(no output)"}${notice}`, truncated } }).pipe(Effect.catchTag("Shell.NotFoundError", () => Effect.succeed(undefined))) return { info, capture } }) diff --git a/packages/core/test/tool-shell.test.ts b/packages/core/test/tool-shell.test.ts index f87f95c1879..226c716b190 100644 --- a/packages/core/test/tool-shell.test.ts +++ b/packages/core/test/tool-shell.test.ts @@ -1555,7 +1555,7 @@ describe("ShellTool", () => { { id: settled.metadata?.shellID, status: "completed", - output: "Exited with code 7", + output: "(no output)\n\nExited with code 7", }, ]) }),