Skip to content

Universal macOS build lacks NSAppleEventsUsageDescription, so Apple Events sent from the integrated terminal are refused without a prompt #342365

Open

Agent suggestions

Public preview

Description

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.138.0 (7debcd0), Universal build
  • OS Version: macOS 26.5.1 (25F80), Apple silicon

The Universal (darwin-universal) build's Info.plist has no NSAppleEventsUsageDescription. The darwin-arm64 and darwin (Intel) builds of the same version have it ("An application in Visual Studio Code wants to use AppleScript.").

macOS attributes Apple Events sent by programs run in the integrated terminal to VS Code. Without the usage description, it refuses them without asking the user and records nothing, so System Settings › Privacy & Security › Automation never lists the target app under Visual Studio Code, and there is no switch to turn on. Command-line tools that send Apple Events fail with errAEEventNotPermitted (-1743). osascript is the exception: it can still make macOS ask.

Steps to Reproduce:

  1. Install the Universal build of VS Code 1.138.0.
  2. Open Notes. Visual Studio Code must not have been allowed or denied control of Notes yet.
  3. In the integrated terminal, save this as repro.swift, then run swiftc repro.swift -o repro && ./repro:
import AppKit

// Asks macOS for permission to send Apple Events to Notes, letting it prompt.
guard let notes = NSRunningApplication.runningApplications(withBundleIdentifier: "com.apple.Notes").first else {
    print("open Notes first")
    exit(1)
}
let target = NSAppleEventDescriptor(processIdentifier: notes.processIdentifier)
print(AEDeterminePermissionToAutomateTarget(target.aeDesc, typeWildCard, typeWildCard, true))

Expected: macOS asks whether "Visual Studio Code" may control "Notes".

Actual: -1743 is printed at once, with no prompt. tccd logs:

Refusing TCCAccessRequestIndirect for service kTCCServiceAppleEvents and client /Applications/Visual Studio Code.app[0] without NSAppleEventsUsageDescription key

The key is in the Universal build up to 1.103 and missing from 1.104 on. It looks like the step in build/darwin/sign.ts that adds it now runs after the per-architecture archives are made, and the Universal build is assembled from those archives (#261850). The key was added in 325bea6 (#119787).

Workaround: run osascript -e 'tell application "Notes" to get name' once in the integrated terminal to get the prompt, or install the darwin-arm64 or darwin build.

Related: #307364 (child processes can't reach other TCC-protected resources).

Activity

  1. vs-code-engineering commented on Oct 18, 2026

    @vs-code-engineering
    Contributor

    Thanks for creating this issue! It looks like you may be using an old version of VS Code; the latest stable release is 1.142.0. Please try upgrading to the latest version and checking whether this issue remains.

    Happy Coding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions