-
Notifications
You must be signed in to change notification settings - Fork 948
Description
Problem
When running an app that needs microphone or camera access from T3 Code's integrated terminal, macOS never shows the permission prompt — it silently fails. The same app works fine when launched from a standalone terminal (e.g. Ghostty).
This affects both dev and production builds.
Cause
macOS TCC requires two things to show privacy permission prompts for child processes:
- A valid code signature on the parent app bundle
- Usage description keys in the app's
Info.plist(e.g.NSMicrophoneUsageDescription)
Dev builds
The dev launcher (apps/desktop/scripts/electron-launcher.mjs) patches the Electron app bundle's Info.plist (display name, bundle ID, icon) but doesn't re-sign the bundle afterward. This invalidates the existing code signature, so TCC silently denies all permission prompts for child processes.
Production builds
The mac build config in scripts/build-desktop-artifact.ts has two issues:
- No usage description keys —
NSMicrophoneUsageDescription,NSCameraUsageDescription, etc. are not included in the macextendInfo, so macOS doesn't know the app needs those permissions. - Unsigned builds have no signature at all —
CSC_IDENTITY_AUTO_DISCOVERYis set to"false"for all unsigned builds, which disables signing entirely. Without even an ad-hoc signature, TCC can't attribute permissions to the app.
Suggested fix
Dev (~11 lines, 1 file)
Ad-hoc re-sign the app bundle after patching plists in electron-launcher.mjs:
spawnSync("codesign", ["--force", "--deep", "--sign", "-", appBundlePath]);I've tested this locally and it resolves the issue for dev.
Prod
- Add
NSMicrophoneUsageDescriptionandNSCameraUsageDescriptionto the mac build config viaextendInfo. - For unsigned mac builds, use ad-hoc signing (
identity: "-") instead of disabling signing entirely.
I haven't been able to test the prod fix locally (no signing setup), but the approach matches Apple's TCC documentation.
Reproduction
- Open a project in T3 Code (desktop, macOS)
- In the integrated terminal, run any app that requests microphone or camera access
- No permission prompt appears; the app fails silently
- Run the same command in an external terminal — it works
PR
I created a PR, but I think it was auto closed.