From ccfd2a48ad0f4582b3a7dd745761c07d949b8b0d Mon Sep 17 00:00:00 2001 From: Adam Weidman Date: Mon, 16 Mar 2026 18:17:37 -0400 Subject: [PATCH] fix(cli): only add shell PTYs to backgroundedPids set Non-shell executions rely on the onBackground listener to register in the UI panel. Adding their PID to backgroundedPids before firing the listener caused them to be skipped and disappear from the UI. --- packages/cli/src/ui/hooks/shellCommandProcessor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/src/ui/hooks/shellCommandProcessor.ts b/packages/cli/src/ui/hooks/shellCommandProcessor.ts index a8ebca2535..a67711c5e4 100644 --- a/packages/cli/src/ui/hooks/shellCommandProcessor.ts +++ b/packages/cli/src/ui/hooks/shellCommandProcessor.ts @@ -204,8 +204,8 @@ export const useShellCommandProcessor = ( // Use ShellExecutionService for shell PTYs (handles log files, etc.), // fall back to ExecutionLifecycleService for non-shell executions // (e.g. remote agents, MCP tools, local agents). - m.backgroundedPids.add(pidToBackground); if (state.activeShellPtyId) { + m.backgroundedPids.add(pidToBackground); ShellExecutionService.background(pidToBackground); } else { ExecutionLifecycleService.background(pidToBackground);