diff --git a/cli/src/lib/local.ts b/cli/src/lib/local.ts index 3d3e422aeac..eb60b4807d6 100644 --- a/cli/src/lib/local.ts +++ b/cli/src/lib/local.ts @@ -193,6 +193,7 @@ export async function startLocalDaemon(): Promise { for (const key of [ "ANTHROPIC_API_KEY", "BASE_DATA_DIR", + "RUNTIME_HTTP_PORT", "VELLUM_DAEMON_TCP_PORT", "VELLUM_DAEMON_TCP_HOST", "VELLUM_DAEMON_SOCKET", diff --git a/clients/macos/vellum-assistant/App/AppDelegate.swift b/clients/macos/vellum-assistant/App/AppDelegate.swift index df71e9ca5d5..390234393f5 100644 --- a/clients/macos/vellum-assistant/App/AppDelegate.swift +++ b/clients/macos/vellum-assistant/App/AppDelegate.swift @@ -557,12 +557,10 @@ public final class AppDelegate: NSObject, NSApplicationDelegate { let assistant = loadAssistantFromLockfile() - // Ensure the daemon starts its runtime HTTP server so the app - // can communicate over HTTP instead of IPC. - if FeatureFlagManager.shared.isEnabled(.localHttpEnabled) { - if ProcessInfo.processInfo.environment["RUNTIME_HTTP_PORT"] == nil { - setenv("RUNTIME_HTTP_PORT", "7821", 0) - } + // Ensure the daemon starts its runtime HTTP server so the + // gateway can proxy iOS traffic to it. + if ProcessInfo.processInfo.environment["RUNTIME_HTTP_PORT"] == nil { + setenv("RUNTIME_HTTP_PORT", "7821", 0) } configureDaemonTransport(for: assistant) diff --git a/clients/macos/vellum-assistant/App/AssistantCli.swift b/clients/macos/vellum-assistant/App/AssistantCli.swift index 197e44e8b2e..20afdb18f9a 100644 --- a/clients/macos/vellum-assistant/App/AssistantCli.swift +++ b/clients/macos/vellum-assistant/App/AssistantCli.swift @@ -602,10 +602,9 @@ final class AssistantCli { env[key] = val } } - // Forward RUNTIME_HTTP_PORT only when the localHttpEnabled flag - // is active, so the daemon doesn't start its HTTP server by default. - if FeatureFlagManager.shared.isEnabled(.localHttpEnabled), - let port = fullEnv["RUNTIME_HTTP_PORT"] ?? getenv("RUNTIME_HTTP_PORT").flatMap({ String(cString: $0) }) { + // Always forward RUNTIME_HTTP_PORT so the daemon starts its + // HTTP server — required for iOS pairing via the gateway. + if let port = fullEnv["RUNTIME_HTTP_PORT"] ?? getenv("RUNTIME_HTTP_PORT").flatMap({ String(cString: $0) }) { env["RUNTIME_HTTP_PORT"] = port } proc.environment = env