diff --git a/apps/desktop/src/main/lib/notifications/server.ts b/apps/desktop/src/main/lib/notifications/server.ts index 089824f0f92..7f4e849d50b 100644 --- a/apps/desktop/src/main/lib/notifications/server.ts +++ b/apps/desktop/src/main/lib/notifications/server.ts @@ -1,7 +1,6 @@ import { EventEmitter } from "node:events"; import express from "express"; import { NOTIFICATION_EVENTS } from "shared/constants"; -import { debugLog } from "shared/debug"; import { env } from "shared/env.shared"; import type { AgentLifecycleEvent } from "shared/notification-types"; import { appState } from "../app-state"; @@ -145,14 +144,6 @@ app.get("/hook/complete", (req, res) => { const mappedEventType = mapEventType(eventType as string | undefined); - debugLog("notifications", "Received hook:", { - eventType, - mappedEventType, - paneId, - tabId, - workspaceId, - }); - // Unknown or missing eventType: return success but don't process // This ensures forward compatibility and doesn't block the agent if (!mappedEventType) { diff --git a/apps/desktop/src/main/lib/terminal/env.ts b/apps/desktop/src/main/lib/terminal/env.ts index db0429834f9..f380d0df957 100644 --- a/apps/desktop/src/main/lib/terminal/env.ts +++ b/apps/desktop/src/main/lib/terminal/env.ts @@ -98,6 +98,10 @@ const ALLOWED_ENV_VARS = new Set([ "LC_TIME", "TZ", + // Shell initialization (required for agent wrapper PATH injection) + "ZDOTDIR", // zsh config directory - used to source our wrapper + "BASH_ENV", // bash startup file - used for non-interactive shells + // Terminal/display "DISPLAY", "COLORTERM", diff --git a/apps/desktop/src/renderer/stores/tabs/useAgentHookListener.ts b/apps/desktop/src/renderer/stores/tabs/useAgentHookListener.ts index e63365c3a1e..27e8a100eb2 100644 --- a/apps/desktop/src/renderer/stores/tabs/useAgentHookListener.ts +++ b/apps/desktop/src/renderer/stores/tabs/useAgentHookListener.ts @@ -60,13 +60,6 @@ export function useAgentHookListener() { const { paneId, workspaceId } = target; if (event.type === NOTIFICATION_EVENTS.AGENT_LIFECYCLE) { - debugLog("agent-hooks", "Received:", { - eventType: event.data?.eventType, - paneId, - workspaceId, - currentWorkspace: currentWorkspaceIdRef.current, - }); - if (!paneId) return; const lifecycleEvent = event.data;