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.
This commit is contained in:
Adam Weidman
2026-03-16 18:17:37 -04:00
parent aabc27c12d
commit ccfd2a48ad
@@ -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);