From a2312a10d8671e4b009e16c9c91ad504b8d16606 Mon Sep 17 00:00:00 2001 From: Vellum Assistant Date: Mon, 23 Feb 2026 21:37:05 -0500 Subject: [PATCH] fix: restrict bundle ID injection to target app matches only In cross-app workflows (e.g., "copy from Chrome and paste into Safari"), the targetAppBundleId was unconditionally injected when the LLM didn't provide one. This caused the target app's bundle ID to be attached to requests for a different app, leading to wrong app activation since bundle ID takes priority in openApp resolution. Now only injects targetAppBundleId when the requested app matches the target app (or no app name is specified). Addresses review feedback from #7434. Co-Authored-By: Claude Opus 4.6 --- assistant/src/daemon/computer-use-session.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assistant/src/daemon/computer-use-session.ts b/assistant/src/daemon/computer-use-session.ts index 24e8e665ed8..5c85a594835 100644 --- a/assistant/src/daemon/computer-use-session.ts +++ b/assistant/src/daemon/computer-use-session.ts @@ -685,8 +685,8 @@ export class ComputerUseSession { }; } - // Inject targetAppBundleId when the LLM didn't provide one - if (!input.app_bundle_id && this.targetAppBundleId) { + // Inject targetAppBundleId only when the requested app matches the target app + if (!input.app_bundle_id && this.targetAppBundleId && (!requestedApp || this.isTargetAppMatch(requestedApp))) { input = { ...input, app_bundle_id: this.targetAppBundleId }; } }