From 51a082cea39821bab75eb2a810067ba4e73d9858 Mon Sep 17 00:00:00 2001 From: Luke Parker <10430890+Hona@users.noreply.github.com> Date: Sat, 29 Aug 2026 13:08:50 +1000 Subject: [PATCH] fix(core): release exited shell execution state (#46058) --- packages/core/src/shell.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/core/src/shell.ts b/packages/core/src/shell.ts index 508e50454f6..9ea658d533a 100644 --- a/packages/core/src/shell.ts +++ b/packages/core/src/shell.ts @@ -369,9 +369,11 @@ const layer = () => if (!oldest) break yield* removeCommand(oldest) } - // Cancel a pending timeout once the command exits on its own. Interrupting last avoids - // aborting finish when finish itself runs on the timeout fiber. - if (command.timeoutFiber) yield* Fiber.interrupt(command.timeoutFiber) + // Keep exited history data-only. Interrupt last because finish may run on the timeout fiber. + const timeoutFiber = command.timeoutFiber + command.timeout = undefined + command.timeoutFiber = undefined + if (timeoutFiber) yield* Fiber.interrupt(timeoutFiber) }) command.timeout = (duration) =>